Click here to Skip to main content
15,908,013 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: getting value zero when caculating value between dates in ado.net using asp.net with c# Pin
developerit14-Jun-10 21:28
developerit14-Jun-10 21:28 
GeneralRe: getting value zero when caculating value between dates in ado.net using asp.net with c# Pin
<<Tash18>>14-Jun-10 23:35
<<Tash18>>14-Jun-10 23:35 
GeneralRe: getting value zero when caculating value between dates in ado.net using asp.net with c# Pin
developerit14-Jun-10 23:50
developerit14-Jun-10 23:50 
AnswerRe: getting value zero when caculating value between dates in ado.net using asp.net with c# Pin
Tej Aj14-Jun-10 1:35
Tej Aj14-Jun-10 1:35 
GeneralRe: getting value zero when caculating value between dates in ado.net using asp.net with c# Pin
developerit14-Jun-10 21:33
developerit14-Jun-10 21:33 
GeneralRe: getting value zero when caculating value between dates in ado.net using asp.net with c# Pin
Tej Aj16-Jun-10 3:39
Tej Aj16-Jun-10 3:39 
Questionhow to implement treeview drag and drop of a node using asp.net Pin
lakshmichawala13-Jun-10 20:08
lakshmichawala13-Jun-10 20:08 
AnswerRe: how to implement treeview drag and drop of a node using asp.net Pin
Peace ON13-Jun-10 21:34
Peace ON13-Jun-10 21:34 
QuestionDatalist radiobutton onmouseover Pin
kdwarak13-Jun-10 19:59
kdwarak13-Jun-10 19:59 
QuestionExcel Field problem Pin
SreejithKumar M13-Jun-10 19:09
SreejithKumar M13-Jun-10 19:09 
QuestionUnable to launch the ASP.NET Development Server. Port 'n' is in use Pin
Member 391904913-Jun-10 10:57
Member 391904913-Jun-10 10:57 
AnswerRe: Unable to launch the ASP.NET Development Server. Port 'n' is in use Pin
Abhijit Jana13-Jun-10 18:05
professionalAbhijit Jana13-Jun-10 18:05 
Questionaccess ConfigurationManager.AppSettings Pin
Hemant Thaker13-Jun-10 9:03
Hemant Thaker13-Jun-10 9:03 
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 

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.