Click here to Skip to main content
15,925,782 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: question about Visual STudio 2008 Pin
sulabh202021-Jan-08 18:27
sulabh202021-Jan-08 18:27 
General800x600 website Pin
eyeseetee21-Jan-08 9:35
eyeseetee21-Jan-08 9:35 
GeneralRe: 800x600 website Pin
StianSandberg21-Jan-08 10:13
StianSandberg21-Jan-08 10:13 
Generalget screen resolution Pin
kani9821-Jan-08 8:59
kani9821-Jan-08 8:59 
GeneralRe: get screen resolution Pin
pmarfleet21-Jan-08 9:34
pmarfleet21-Jan-08 9:34 
GeneralRe: get screen resolution Pin
kani9821-Jan-08 12:01
kani9821-Jan-08 12:01 
GeneralRe: get screen resolution Pin
pmarfleet21-Jan-08 19:32
pmarfleet21-Jan-08 19:32 
GeneralRe: get screen resolution Pin
Elayaraja Sambasivam22-Jan-08 3:36
Elayaraja Sambasivam22-Jan-08 3:36 
GeneralScheduling an occasional server task (part 2) Pin
chaiguy133721-Jan-08 7:32
chaiguy133721-Jan-08 7:32 
Questionhow can design a template for GridView? Pin
B.A21-Jan-08 7:32
B.A21-Jan-08 7:32 
AnswerRe: how can design a template for GridView? Pin
_AK_21-Jan-08 21:53
_AK_21-Jan-08 21:53 
GeneralRe: how can design a template for GridView? Pin
B.A21-Jan-08 23:21
B.A21-Jan-08 23:21 
GeneralNeed help for connection to webservice! Pin
Member 470816321-Jan-08 4:16
Member 470816321-Jan-08 4:16 
GeneralRe: Need help for connection to webservice! Pin
pmarfleet21-Jan-08 9:35
pmarfleet21-Jan-08 9:35 
GeneralAny asp.net control Pin
Member 406547221-Jan-08 3:22
Member 406547221-Jan-08 3:22 
GeneralRe: Any asp.net control Pin
Michael Sync21-Jan-08 4:21
Michael Sync21-Jan-08 4:21 
GeneralRe: Any asp.net control Pin
Kariem Soudy21-Jan-08 4:24
Kariem Soudy21-Jan-08 4:24 
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:
]]>
<asp:panel id="Panel1" runat="server" width="200px" borderstyle="Solid" bordercolor="Black" borderwidth="1">


School
<asp:textbox id="TextBox1" runat="server">


 Major
<asp:textbox id="TextBox2" runat="server">


Degree
<asp:dropdownlist id="DropDownList1" runat="server">





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:
<asp:panel id="Panel1" runat="server"><br />
        <%<br />
            try<br />
            {<br />
                int ItemsCount = 0;<br />
                ItemsCount = Convert.ToInt32(Session["ItemsCount"].ToString());<br />
                for (int i = 0; i < ItemsCount; i++)<br />
                {<br />
                    int Counter = i + 1;<br />
                    Education1.ID = "Education" + Counter.ToString();<br />
                %><br />
                    <uc1:education runat="server" id="Education1" /><br />
                <%<br />
                }<br />
            }<br />
            catch (Exception ex)<br />
            {<br />
             }<br />
         %><br />
</asp:panel>


4)add a button and type this in the click event;
if (Session["ItemsCount"] != null)<br />
 {<br />
     int SessionValue = Convert.ToInt32(Session["ItemsCount"].ToString());<br />
     SessionValue++;<br />
     Session["ItemsCount"] = SessionValue.ToString();<br />
 }<br />
 else<br />
 {<br />
     Session["ItemsCount"] = "1";<br />
 }


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

GeneralRe: Any asp.net control Pin
Kariem Soudy21-Jan-08 4:28
Kariem Soudy21-Jan-08 4:28 
GeneralRe: Any asp.net control Pin
Member 406547223-Jan-08 5:28
Member 406547223-Jan-08 5:28 
Generalproblem with ProfileBindings Pin
Kariem Soudy21-Jan-08 2:50
Kariem Soudy21-Jan-08 2:50 
Generalsentax for C# statement whilw using SQL query Pin
mavii21-Jan-08 2:31
mavii21-Jan-08 2:31 
GeneralMultipost and Wrong Forum -- Please ignore Pin
Vasudevan Deepak Kumar21-Jan-08 3:13
Vasudevan Deepak Kumar21-Jan-08 3:13 
GeneralRe: sentax for C# statement whilw using SQL query Pin
Kariem Soudy21-Jan-08 3:26
Kariem Soudy21-Jan-08 3:26 
GeneralRe: sentax for C# statement whilw using SQL query Pin
mavii21-Jan-08 5:50
mavii21-Jan-08 5:50 
GeneralHelp me Pin
Zeeshan Ahmed Memon21-Jan-08 1:56
Zeeshan Ahmed Memon21-Jan-08 1:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.