I'll have to try again. But I keep getting errors and our .Net gurus where I work (our network guys) said it's because I'm trying to use a Windows Forms functionality with a Web Form. But I'm also working without a Localhost because of the way .Net was installed on our systems and servers. Krisman
krisman
Posts
-
fill a textbox from a dataset -
fill a textbox from a datasetThis will only work in a Windows Form, I've learned that much. I'm building WebForms, so I have to come up with different round-about ways to do things. Microsoft has never been known for being user and/or developer friendly. Krisman
-
fill a textbox from a datasetNot quite getting result I thought, but at least there is a result! I'll do some more tinkering. Thanks! Krisman
-
fill a textbox from a datasetHi. This is probably real easy, but I just can't seem to figure it out. I have a dataset that returns a unique value. I would like to move that value to a textbox. No matter what I try, I can't get my code to fill the textbox. I use a dataadapter, dataset, sqlcommand and sqlparm to read a sql2000 stored procedure. I put in the city name and get out the unique city id number we use. I've run teh stored procedure separately and I know it works. Do I databind the textbox to the dataset? This is the code I'm currently using: da = new SqlDataAdapter("ap_prs_frm_addr_urbn_cmty_id", addr_urbn_conn); da.SelectCommand.CommandType = CommandType.StoredProcedure; ds = new DataSet(); SqlParameter addr_urbn_parm; addr_urbn_parm = new SqlParameter("@cmty_desc", System.Data.SqlDbType.VarChar); addr_urbn_parm.Direction = ParameterDirection.Input; addr_urbn_parm.Value = ddlAddrUrbnCmty.SelectedItem.Text; addr_urbn_parm = new SqlParameter("@cmty_id", System.Data.SqlDbType.VarChar); addr_urbn_parm.Direction = ParameterDirection.Input; addr_urbn_parm.Value = ds.ToString(); da.SelectCommand.Parameters.Add(addr_urbn_parm); addr_urbn_conn.Open(); da.Fill(ds); addr_urbn_conn.Close(); this.txtAddrUrbnCmtyID.DataBind(); Help!!!!!!! Krisman
-
another dropdownlist questionI found the answer. I was using IsPostback like everyone suggested and it was always reloading because I was repopulating teh dropdownlist. Anyway the answer is in the onSelectedIndexChanged property. That way you don't have to worry about the IsPostback. Krisman
-
another dropdownlist questionHow can you tell I'm a newbie, eh? I have two dropdownlists and two textboxes. Dropdown1 lets you select a city (listr is gathered from a SQL server database) and then fills textbox1. Dropdown2 lets you select a street name for the chosen city (also gathered from a SQl server database), but I can't move the value into textbox2. It seems that on the postback, the selection is cleared from dropdown2. psuedo-code: if not ispostback { get city and move selected value to textbox1 } if ispostback { get street name and move selected value to textbox2 } What am I doing wrong? Krisman
-
dropdownlist questionThanks. This confirms what I have thought. This helps a lot. Krisman
-
dropdownlist questionI have a dropdownlist of 5 items, but user wants one that is not in the list. How do I allow for user input/editing of a dropdownlist? Krisman
-
server.transfer questionHi. I'm using transer from the first page and then transfer from the secondary page back to the first page. I tried server.execeute, but that didn't close the main-page, it just put the secondary-page over top of the main-page, causing a very jumbled up looking mess. Krisman
-
server.transfer questionHi. I'm passing data from main-page to secondary-page. After I get what I need I want to pass the new data back to the main-page. However, the main-page get's refreshed and nothing is passed. Is this a server.transfer problem, or a postback issue? Krisman
-
asp equivilent for "onclick"Hi. Is there an ASP.NET equivilent of javascript "onclick"? Krisman
-
Server.Transfer VS. Response.RedirectHi. From one newbie to another, I have found that Server.Transfer is the faster of the two, at least over at my development site. Krisman
-
add/remove toolkitI was hoping to create a windows type popup for my webform without using javascript (javascript and/or java is frowned upon where I'm working). Looks like I'm going to have to use javascript though. Thanks for the clarification. Krisman
-
add/remove toolkitHi. Is the add/remove toolkit just for Windows Forms? I'm trying to find it for my webforms, but it is nowhere to be seen. I'm trying to do popup window for a webpage. Krisman
-
new webform inside anotherThank you very much! Krisman
-
new webform inside anotherHi. I'm trying to open a new webform inside another active webform, sort of like a pop-up. THe idea of the smaller form is that the user can select a street for an address to go with the city that was selected on the main form. Once the street is selected, the pop-up closes and the data is moved to the main form. Now, I've been able to do all of this with datagrids on the main form (we use SQL SERVER here), but it is not very nice to the eye. Anyway, my question is thus: Is there a way to have C# open a new, smaller form, without haveing to resort to Javascript in the HTML of the main ASPX page. Krisman