Use attribute property to add read-only in textbox in that case you will not loose values in textbox while postback.
Code Snippet
- protected void Page_Load(object sender, EventArgs e)
- {
- TextBox1.Attributes.Add("readonly", "true");
- }
c# net, c# string, c# array, c# class, c# code, c# for, c# using, visual c#, c# form, c# xml, windows c#, c# application, c# is, c# object, c# example, vb.net c#,c# datetime, c# method, c# thread, c# type
Use attribute property to add read-only in textbox in that case you will not loose values in textbox while postback.
2 comments: