Click here to Skip to main content
15,887,746 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: access ConfigurationManager.AppSettings Pin
Abhijit Jana13-Jun-10 9:23
professionalAbhijit Jana13-Jun-10 9:23 
AnswerRe: access ConfigurationManager.AppSettings Pin
Abhishek Sur13-Jun-10 9:36
professionalAbhishek Sur13-Jun-10 9:36 
QuestionFCKeditor in ASP.NET 2.0 Pin
Mastersev13-Jun-10 4:26
Mastersev13-Jun-10 4:26 
AnswerRe: FCKeditor in ASP.NET 2.0 Pin
Amit Patel198514-Jun-10 1:28
Amit Patel198514-Jun-10 1:28 
GeneralRe: FCKeditor in ASP.NET 2.0 Pin
Mastersev14-Jun-10 2:19
Mastersev14-Jun-10 2:19 
QuestionPage controls keeps same content after postback? Pin
lvq68413-Jun-10 3:49
lvq68413-Jun-10 3:49 
AnswerRe: Page controls keeps same content after postback? Pin
Brij13-Jun-10 5:23
mentorBrij13-Jun-10 5:23 
AnswerRe: Page controls keeps same content after postback? Pin
Abhijit Jana13-Jun-10 9:05
professionalAbhijit Jana13-Jun-10 9:05 
Brij wrote:
One more thing, why you are taking the help of session, you can use viewstate.Enable the viewstate of the contrls on the page that will suffice your requirement.


Relation of textbox and ViewState is something different with respect to other controls. If you make EnableViewState=False; for Textbox, still it will maintain the postback data. Why ?

First of all you need to know what actually happened during ASP.NET Page life cycle and ViewState.
In the ASP.Net page life cycle, two events related with View State.
1. Load View State : Where view state data is loading for the control and which happened before Page_Load.

2. Save View State : Where control data store in a hidden field before the Page_Render.

Now, If you disable the ViewState for the control it should store the view state data but, you are saying in Textbox, after you disabled the view state , control holds the data after postback,
Here is the Trick, There is another event fired during Page Life Cycle, which is, Load PostBack Data
ASP.NET controls which implement IPostBackEventHandler will load its value from the appropriate postback data. This value is not read from view state but from Postback From and this is true for those control which implements the IPostBackEventHandler and TextBox is one such control.

Hope you got my point.
Cheers !
Abhijit Jana | MVP
Web Site : abhijitjana.net | Follow Me @ twitter
Read my Latest Article :Mastering Debugging in VS 2010

GeneralRe: Page controls keeps same content after postback? Pin
Brij13-Jun-10 21:08
mentorBrij13-Jun-10 21:08 
AnswerRe: Page controls keeps same content after postback? Pin
Abhijit Jana13-Jun-10 9:00
professionalAbhijit Jana13-Jun-10 9:00 
GeneralRe: Page controls keeps same content after postback? Pin
lvq68413-Jun-10 21:17
lvq68413-Jun-10 21:17 
QuestionSome text is missing when converting from HTML to PDF! Pin
Member 446383913-Jun-10 1:24
Member 446383913-Jun-10 1:24 
Questioniam getting error in group by condition in ado.net Pin
developerit12-Jun-10 22:37
developerit12-Jun-10 22:37 
AnswerRe: iam getting error in group by condition in ado.net Pin
i.j.russell12-Jun-10 23:23
i.j.russell12-Jun-10 23:23 
QuestionError in dropdownlist binding Pin
mominafiz12-Jun-10 4:38
mominafiz12-Jun-10 4:38 
AnswerRe: Error in dropdownlist binding Pin
Shahriar Iqbal Chowdhury/Galib12-Jun-10 5:11
professionalShahriar Iqbal Chowdhury/Galib12-Jun-10 5:11 
AnswerRe: Error in dropdownlist binding Pin
Blue_Boy12-Jun-10 20:47
Blue_Boy12-Jun-10 20:47 
QuestionScriptManager in Usercontrol is not feasible if I already have an Script Manager in Aspx ? Pin
giantsover11-Jun-10 23:17
giantsover11-Jun-10 23:17 
AnswerRe: ScriptManager in Usercontrol is not feasible if I already have an Script Manager in Aspx ? Pin
Estys12-Jun-10 0:20
Estys12-Jun-10 0:20 
GeneralRe: ScriptManager in Usercontrol is not feasible if I already have an Script Manager in Aspx ? Pin
giantsover12-Jun-10 1:46
giantsover12-Jun-10 1:46 
GeneralRe: ScriptManager in Usercontrol is not feasible if I already have an Script Manager in Aspx ? Pin
Estys12-Jun-10 2:12
Estys12-Jun-10 2:12 
GeneralRe: ScriptManager in Usercontrol is not feasible if I already have an Script Manager in Aspx ? Pin
giantsover12-Jun-10 2:32
giantsover12-Jun-10 2:32 
GeneralRe: ScriptManager in Usercontrol is not feasible if I already have an Script Manager in Aspx ? Pin
Estys12-Jun-10 3:19
Estys12-Jun-10 3:19 
GeneralRe: ScriptManager in Usercontrol is not feasible if I already have an Script Manager in Aspx ? Pin
giantsover12-Jun-10 3:44
giantsover12-Jun-10 3:44 
GeneralRe: ScriptManager in Usercontrol is not feasible if I already have an Script Manager in Aspx ? Pin
Estys12-Jun-10 3:55
Estys12-Jun-10 3:55 

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.