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

ASP.NET

 
GeneralRe: Help with Setting up a data entry form on SQL serv Pin
theimmortalmoo14-Jun-07 6:28
theimmortalmoo14-Jun-07 6:28 
GeneralRe: Help with Setting up a data entry form on SQL serv Pin
Sathesh Sakthivel14-Jun-07 6:33
Sathesh Sakthivel14-Jun-07 6:33 
GeneralRe: Help with Setting up a data entry form on SQL serv Pin
theimmortalmoo14-Jun-07 9:58
theimmortalmoo14-Jun-07 9:58 
QuestionSelect Distinct DATE from DATETIME field Pin
wEb GuRu...14-Jun-07 5:48
wEb GuRu...14-Jun-07 5:48 
AnswerRe: Select Distinct DATE from DATETIME field [modified] Pin
Random Code User14-Jun-07 6:30
Random Code User14-Jun-07 6:30 
QuestionRe: Select Distinct DATE from DATETIME field Pin
wEb GuRu...14-Jun-07 7:04
wEb GuRu...14-Jun-07 7:04 
Questionhow to handle multiple dynamic controls after postback? Pin
Krishnamenon14-Jun-07 5:10
Krishnamenon14-Jun-07 5:10 
AnswerRe: how to handle multiple dynamic controls after postback? Pin
Jesse Squire14-Jun-07 6:11
Jesse Squire14-Jun-07 6:11 
Some general advice for working with dynamic controls
  • Always assign dynamic controls and all of their naming containers explicit ids.
  • Always recreate your dynamic controls in either the page's OnInit method or Init event handler.
  • Ensure that you assign the same id to your controls and all of their naming containers on initial creation and at each postback. Assign the ids at the time you recreate your controls.[OnInit method or in Init event handler]
  • Ensure that you place the controls in the same naming containers on the page on initial creation and at each postback. Site the controls at the time you create them.[OnInit method or in Init event handler]
The ASP.NET page model is going to use a combination of UniqueId, ClientId, and positional association within the control tree in order to restore your control's ViewState, match up post data, and raise postback events. In order to make sure that your controls are created properly for that processing to happen, your best bet is always to preform the actions in the page's OnInit method or Init event handler, as I've beaten to death above. Smile | :)

I'd suggest that you take a peek at the Lifecycle of a Page[^]. Even though that article was written for .NET 1.0, it is still accurate for versions 2.0 and 3.0. It may also prove helpful for you to download a copy of Lutz Roeder's Reflector[^] and look over the implementation of the Page class.

Hope that helps. Smile | :)

  --Jesse
"... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

GeneralRe: how to handle multiple dynamic controls after postback? Pin
Krishnamenon18-Jun-07 3:27
Krishnamenon18-Jun-07 3:27 
GeneralRe: how to handle multiple dynamic controls after postback? Pin
Jesse Squire18-Jun-07 6:43
Jesse Squire18-Jun-07 6:43 
Questionwebpage to Image Pin
Kushi Bobby14-Jun-07 5:06
Kushi Bobby14-Jun-07 5:06 
AnswerRe: webpage to Image Pin
theimmortalmoo14-Jun-07 10:17
theimmortalmoo14-Jun-07 10:17 
GeneralRe: webpage to Image Pin
Kushi Bobby15-Jun-07 0:24
Kushi Bobby15-Jun-07 0:24 
QuestionHow to Submit a Html Form and Get Response Dynamically? Pin
pubududilena14-Jun-07 4:11
pubududilena14-Jun-07 4:11 
AnswerRe: How to Submit a Html Form and Get Response Dynamically? Pin
Krishnamenon14-Jun-07 5:15
Krishnamenon14-Jun-07 5:15 
QuestionHow to ignore html tags in page Pin
Sandeep Akhare14-Jun-07 3:38
Sandeep Akhare14-Jun-07 3:38 
AnswerRe: How to ignore html tags in page Pin
szukuro14-Jun-07 3:56
szukuro14-Jun-07 3:56 
AnswerRe: How to ignore html tags in page Pin
Tarakeshwar Reddy14-Jun-07 3:58
professionalTarakeshwar Reddy14-Jun-07 3:58 
QuestionNeed Help Pin
rahul.net1114-Jun-07 2:47
rahul.net1114-Jun-07 2:47 
AnswerRe: Need Help Pin
Craster14-Jun-07 3:18
Craster14-Jun-07 3:18 
AnswerRe: Need Help Pin
leckey14-Jun-07 4:16
leckey14-Jun-07 4:16 
Questiong Pin
rahul.net1114-Jun-07 2:44
rahul.net1114-Jun-07 2:44 
QuestionSMTP Exception Pin
DKalepu14-Jun-07 2:28
DKalepu14-Jun-07 2:28 
AnswerRe: SMTP Exception Pin
szukuro14-Jun-07 2:43
szukuro14-Jun-07 2:43 
GeneralRe: SMTP Exception Pin
DKalepu14-Jun-07 2:50
DKalepu14-Jun-07 2:50 

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.