Click here to Skip to main content
15,896,358 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionTextBox event handling inside a datalist on a WebForm Pin
MacIntyre22-Jul-09 13:17
MacIntyre22-Jul-09 13:17 
AnswerRe: TextBox event handling inside a datalist on a WebForm Pin
Herman<T>.Instance22-Jul-09 23:12
Herman<T>.Instance22-Jul-09 23:12 
GeneralRe: TextBox event handling inside a datalist on a WebForm Pin
MacIntyre23-Jul-09 5:38
MacIntyre23-Jul-09 5:38 
QuestionDropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
TMFoust22-Jul-09 9:48
TMFoust22-Jul-09 9:48 
AnswerRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
Blue_Boy22-Jul-09 9:54
Blue_Boy22-Jul-09 9:54 
AnswerRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
Brij22-Jul-09 9:55
mentorBrij22-Jul-09 9:55 
GeneralRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
TMFoust22-Jul-09 10:06
TMFoust22-Jul-09 10:06 
GeneralRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
Abhijit Jana22-Jul-09 10:13
professionalAbhijit Jana22-Jul-09 10:13 
TMFoust wrote:
Nope, that's not it. If I set AutoPostBack, the dropdownlist does not retain the selected change.

That because you did not check the Page.ISPostBack Property. Where you bind the data in Dropdown list?

Try this in Page_Load()

if(!Page.ISPostBack)     // This will load the data if the page is not a post back request.
   {
    //Bind Data in Dropdown list
   }

TMFoust wrote:
Christian Graus answererd a similar question (Re: Problem in handling SelectedIndexChanged event of a dynamically created drop down) and stated that the dropdownlist needed to be created before page load.

He tolds about the dynamic Control. Cause All the view state and Postback data loads just before the Page_Load(). So if your creates any control after Page_Load(), it will not able to load Pastback and View State Data. So that it is recomanded to Create Dynamic control in Page_PreInit() Event.

Hope this will clear your doubts. Smile | :)

cheers,
Abhijit
CodeProject MVP
Web Site:abhijitjana.net
When you ask a question, remember to click "Good Answer", If the Answer is helps you.

GeneralRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
Brij22-Jul-09 10:13
mentorBrij22-Jul-09 10:13 
GeneralRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
TMFoust22-Jul-09 10:30
TMFoust22-Jul-09 10:30 
GeneralRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
Abhijit Jana22-Jul-09 10:38
professionalAbhijit Jana22-Jul-09 10:38 
GeneralRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
TMFoust22-Jul-09 10:47
TMFoust22-Jul-09 10:47 
GeneralRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
Abhijit Jana22-Jul-09 11:01
professionalAbhijit Jana22-Jul-09 11:01 
GeneralRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
Brij22-Jul-09 10:41
mentorBrij22-Jul-09 10:41 
AnswerRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
Christian Graus22-Jul-09 11:09
protectorChristian Graus22-Jul-09 11:09 
GeneralRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
TMFoust22-Jul-09 11:18
TMFoust22-Jul-09 11:18 
GeneralRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
TMFoust22-Jul-09 11:19
TMFoust22-Jul-09 11:19 
GeneralRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
Christian Graus22-Jul-09 13:37
protectorChristian Graus22-Jul-09 13:37 
GeneralRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
TMFoust23-Jul-09 3:28
TMFoust23-Jul-09 3:28 
GeneralRe: Dropdownlist not responding to the "OnSelectedIndexChanged" method. Pin
TMFoust23-Jul-09 4:43
TMFoust23-Jul-09 4:43 
Questionbar chart graph in asp.net when data is fed from database?? Pin
solo_gaurav22-Jul-09 8:55
solo_gaurav22-Jul-09 8:55 
AnswerRe: bar chart graph in asp.net when data is fed from database?? Pin
Brij22-Jul-09 9:09
mentorBrij22-Jul-09 9:09 
AnswerRe: bar chart graph in asp.net when data is fed from database?? Pin
Abhijit Jana22-Jul-09 9:16
professionalAbhijit Jana22-Jul-09 9:16 
GeneralRe: bar chart graph in asp.net when data is fed from database?? Pin
solo_gaurav22-Jul-09 9:31
solo_gaurav22-Jul-09 9:31 
GeneralRe: bar chart graph in asp.net when data is fed from database?? Pin
Brij22-Jul-09 9:36
mentorBrij22-Jul-09 9:36 

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.