Hi, we have different ways to do this.
1. You can define a separate public class file with properties
public string textboxvalue {get;set;}
In the .aspx.cs of page with textbox, assign the value to this class property and use this wherever you need it. We call this as DTO
2.You can include the values into a session variable.
Session["MySession"]=txtid.Text; (txtid is the id of textbox).
3.You can pass the textbox value on to the querystring.
On click of the button, you are navigate to another page.
Include the NavigateUrl or Postbackurl of the button to "~/urnavigatingpage.aspx?UserName="+txtid.Text;
You can observe this value passing through the querystring in the address bar.
Get the query string value using
string txtvalue = Request.QueryString["UserName"].Value;
Regards,
Awesome Coding !! :)
anwarbesa-15403, if this helps please login to Mark As Answer. | Alert Moderator