Any asp.net control
-
hi evrybody i am looking for solution to this 1.i have form in which there is 3 fields textbox=>school textbox=>Major dropdownlist=>Degree 2. i want to place button (Add Education) which will add another set of same controls with diffrent ids 3. and i want to place button (Delete Education) which will delete the last added conrol set by (Add Education) i know i have tried by javascript by copying from site i was inspired by desighn of this kind of user control but i ended up in tears because id generated by javascript was like ****ucResDesiredPos:Relocation~RelocationStateProvince~0~0*** which is not allowed by asp.net contorls please help me with clear solution because i am new to asp.net it works fine by javascript and normal html contol but not with asp.net conrols...will it be possible by multi view thank you very much in advance please helppppp
appu
-
hi evrybody i am looking for solution to this 1.i have form in which there is 3 fields textbox=>school textbox=>Major dropdownlist=>Degree 2. i want to place button (Add Education) which will add another set of same controls with diffrent ids 3. and i want to place button (Delete Education) which will delete the last added conrol set by (Add Education) i know i have tried by javascript by copying from site i was inspired by desighn of this kind of user control but i ended up in tears because id generated by javascript was like ****ucResDesiredPos:Relocation~RelocationStateProvince~0~0*** which is not allowed by asp.net contorls please help me with clear solution because i am new to asp.net it works fine by javascript and normal html contol but not with asp.net conrols...will it be possible by multi view thank you very much in advance please helppppp
appu
You may want to use DataGrid for that. Add the textboxes and dropdownlist in Datagrid and you can use Gird footer for adding new records. It would be more easier for you.
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
-
hi evrybody i am looking for solution to this 1.i have form in which there is 3 fields textbox=>school textbox=>Major dropdownlist=>Degree 2. i want to place button (Add Education) which will add another set of same controls with diffrent ids 3. and i want to place button (Delete Education) which will delete the last added conrol set by (Add Education) i know i have tried by javascript by copying from site i was inspired by desighn of this kind of user control but i ended up in tears because id generated by javascript was like ****ucResDesiredPos:Relocation~RelocationStateProvince~0~0*** which is not allowed by asp.net contorls please help me with clear solution because i am new to asp.net it works fine by javascript and normal html contol but not with asp.net conrols...will it be possible by multi view thank you very much in advance please helppppp
appu
hello, please follow these steps: 1)create a web user control named Education and contains your 3 controls and customize it as u like,it should be like this: **]]>
School
Major
Degree
**2)in your webform add this directive in the top of the page code right after the <%@ page %> directive: ]]> 3)add this code in your webform code:<% try { int ItemsCount = 0; ItemsCount = Convert.ToInt32(Session["ItemsCount"].ToString()); for (int i = 0; i < ItemsCount; i++) { int Counter = i + 1; Education1.ID = "Education" + Counter.ToString(); %> <% } } catch (Exception ex) { } %>
4)add a button and type this in the click event;if (Session["ItemsCount"] != null) { int SessionValue = Convert.ToInt32(Session["ItemsCount"].ToString()); SessionValue++; Session["ItemsCount"] = SessionValue.ToString(); } else { Session["ItemsCount"] = "1"; }
that's it, and you may put all of that in an updatepanel to have the AJAX effect.... i wish that could help you, please let me know if there're any errors...Web Developer @ Silverkey Egypt
-
hello, please follow these steps: 1)create a web user control named Education and contains your 3 controls and customize it as u like,it should be like this: **]]>
School
Major
Degree
**2)in your webform add this directive in the top of the page code right after the <%@ page %> directive: ]]> 3)add this code in your webform code:<% try { int ItemsCount = 0; ItemsCount = Convert.ToInt32(Session["ItemsCount"].ToString()); for (int i = 0; i < ItemsCount; i++) { int Counter = i + 1; Education1.ID = "Education" + Counter.ToString(); %> <% } } catch (Exception ex) { } %>
4)add a button and type this in the click event;if (Session["ItemsCount"] != null) { int SessionValue = Convert.ToInt32(Session["ItemsCount"].ToString()); SessionValue++; Session["ItemsCount"] = SessionValue.ToString(); } else { Session["ItemsCount"] = "1"; }
that's it, and you may put all of that in an updatepanel to have the AJAX effect.... i wish that could help you, please let me know if there're any errors...Web Developer @ Silverkey Egypt
please note that this tag will not be included while you type the code i've shown: **and ]]> please remove it, thnx
Web Developer @ Silverkey Egypt
**
-
hello, please follow these steps: 1)create a web user control named Education and contains your 3 controls and customize it as u like,it should be like this: **]]>
School
Major
Degree
**2)in your webform add this directive in the top of the page code right after the <%@ page %> directive: ]]> 3)add this code in your webform code:<% try { int ItemsCount = 0; ItemsCount = Convert.ToInt32(Session["ItemsCount"].ToString()); for (int i = 0; i < ItemsCount; i++) { int Counter = i + 1; Education1.ID = "Education" + Counter.ToString(); %> <% } } catch (Exception ex) { } %>
4)add a button and type this in the click event;if (Session["ItemsCount"] != null) { int SessionValue = Convert.ToInt32(Session["ItemsCount"].ToString()); SessionValue++; Session["ItemsCount"] = SessionValue.ToString(); } else { Session["ItemsCount"] = "1"; }
that's it, and you may put all of that in an updatepanel to have the AJAX effect.... i wish that could help you, please let me know if there're any errors...Web Developer @ Silverkey Egypt
thank you for helping but the code u gave me was in c# and i use vb but i did manage to get it working but nothings hapening
appu