how to fetch form 'id' in the next Page

Kosheen

New Member
<form runat=server><BR><asp:text id="box" runat=server /><BR></form><BR>Suppose this code is in Page 1<BR>How to access the value of "box" in Page 2<BR><BR>Please Help Me Out!!A server-side form does a postback to the inital page. So Page 2 here is Page 1. You can treat the textbox as a Textbox object in your server side code. So, in the same ASP.NET Web page, add at the top:<BR><BR><script language="VB" runat="server"><BR><BR>sub Page_Load(sender as Object, e as EventArgs)<BR> Response.Write("The value of box is " & box.Text)<BR>end sub<BR><BR></script><BR><BR>(Also note that you have a small typo: it's <asp:textbox ... /> not <asp:text ... />)<BR><BR>Happy Programming!<BR>Sir...<BR>I think there was some communication gap in understanding my problem..let me try to write a code..may be that will be easy for u to solve my problem...Here it goes!!<BR><BR><script language="vb" runat="server"><BR><BR>sub buttonclick(s as Object, e as Eventargs)<BR><BR>Response.Redirect("page2.aspx")<BR><BR>end sub<BR></script><BR><html><BR><body><BR></script><BR><form runat="Server"><BR><asp:textbox id="box" runat="server"/><BR><asp:button id="b1" onClick="buttonclick" runat="server" /><BR></form><BR></body><BR></html><BR><BR>Now is Page2.aspx file, I want to show the value of textbox in Page1.aspx..how do i do it...your code is not working for that matter...Plz help me out...<BR>
 
Back
Top