I need knowhow/article about adding input controls dynamically in asp.net
-
Well nearly getting familiar with asp.net, theres one thing I still havent figured out! I dont have the time to do this myself, so I hope someone did me (and others) the favorit, to check it out and write about it. Pseudo code: while not rs.EOF Response.write("" & rs("jobtypename") rs.next loop In old school ASP I did this day in day out, but in ASP.NET !!!!! Well I know things have changed, and i read about page life cycle, I tried datagrids and views and many things. But I still havent found a good way to add many similar controls dynamically to a webpage under asp.net. And I dont want grids or radiobutton lists. I often make a dynamically html table, where there's different controls in some of the columns, and they wil refeer to the row id from the DB (yes I now its grid like) but I want to built it myself in the code behind iterating the record set. The problem is that I can add the controls and other stuff during first "!IsPostback" but then they will be gone after another "runat=server" control does a postback. And they dont keep their values in between postback, because they cannot be "runat=server and dont get part of the viewstate data. So if you now a way of dealing with this problem, or an article describing it, I would be terrible glad to hear about it. Regards from Mulgurul, The last wave is yet to come!
-
Well nearly getting familiar with asp.net, theres one thing I still havent figured out! I dont have the time to do this myself, so I hope someone did me (and others) the favorit, to check it out and write about it. Pseudo code: while not rs.EOF Response.write("" & rs("jobtypename") rs.next loop In old school ASP I did this day in day out, but in ASP.NET !!!!! Well I know things have changed, and i read about page life cycle, I tried datagrids and views and many things. But I still havent found a good way to add many similar controls dynamically to a webpage under asp.net. And I dont want grids or radiobutton lists. I often make a dynamically html table, where there's different controls in some of the columns, and they wil refeer to the row id from the DB (yes I now its grid like) but I want to built it myself in the code behind iterating the record set. The problem is that I can add the controls and other stuff during first "!IsPostback" but then they will be gone after another "runat=server" control does a postback. And they dont keep their values in between postback, because they cannot be "runat=server and dont get part of the viewstate data. So if you now a way of dealing with this problem, or an article describing it, I would be terrible glad to hear about it. Regards from Mulgurul, The last wave is yet to come!
http://support.microsoft.com/kb/317515[^] The most important point: "The controls are created every time that the page is run. The best place to do this is in the Page_Init function that the [YourPage] class provides."
Jon Sagara I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So i had to leave the place as soon as possible. --Mr.Prakash Blog | Site | Articles
-
Well nearly getting familiar with asp.net, theres one thing I still havent figured out! I dont have the time to do this myself, so I hope someone did me (and others) the favorit, to check it out and write about it. Pseudo code: while not rs.EOF Response.write("" & rs("jobtypename") rs.next loop In old school ASP I did this day in day out, but in ASP.NET !!!!! Well I know things have changed, and i read about page life cycle, I tried datagrids and views and many things. But I still havent found a good way to add many similar controls dynamically to a webpage under asp.net. And I dont want grids or radiobutton lists. I often make a dynamically html table, where there's different controls in some of the columns, and they wil refeer to the row id from the DB (yes I now its grid like) but I want to built it myself in the code behind iterating the record set. The problem is that I can add the controls and other stuff during first "!IsPostback" but then they will be gone after another "runat=server" control does a postback. And they dont keep their values in between postback, because they cannot be "runat=server and dont get part of the viewstate data. So if you now a way of dealing with this problem, or an article describing it, I would be terrible glad to hear about it. Regards from Mulgurul, The last wave is yet to come!
-
Well nearly getting familiar with asp.net, theres one thing I still havent figured out! I dont have the time to do this myself, so I hope someone did me (and others) the favorit, to check it out and write about it. Pseudo code: while not rs.EOF Response.write("" & rs("jobtypename") rs.next loop In old school ASP I did this day in day out, but in ASP.NET !!!!! Well I know things have changed, and i read about page life cycle, I tried datagrids and views and many things. But I still havent found a good way to add many similar controls dynamically to a webpage under asp.net. And I dont want grids or radiobutton lists. I often make a dynamically html table, where there's different controls in some of the columns, and they wil refeer to the row id from the DB (yes I now its grid like) but I want to built it myself in the code behind iterating the record set. The problem is that I can add the controls and other stuff during first "!IsPostback" but then they will be gone after another "runat=server" control does a postback. And they dont keep their values in between postback, because they cannot be "runat=server and dont get part of the viewstate data. So if you now a way of dealing with this problem, or an article describing it, I would be terrible glad to hear about it. Regards from Mulgurul, The last wave is yet to come!