Click here to Skip to main content
15,898,588 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionregarding datagrid Pin
Uma Kameswari17-Aug-06 1:19
Uma Kameswari17-Aug-06 1:19 
AnswerRe: regarding datagrid [modified] Pin
Stephen McGuire17-Aug-06 2:08
Stephen McGuire17-Aug-06 2:08 
AnswerRe: regarding datagrid Pin
kalyanPaladugu17-Aug-06 11:50
kalyanPaladugu17-Aug-06 11:50 
QuestionXmlDataSource [modified] Pin
mcgann17-Aug-06 0:22
mcgann17-Aug-06 0:22 
AnswerRe: XmlDataSource Pin
seee sharp17-Aug-06 2:56
seee sharp17-Aug-06 2:56 
QuestionHow to take reference of connection string or connection Pin
sabby200617-Aug-06 0:18
sabby200617-Aug-06 0:18 
AnswerRe: How to take reference of connection string or connection Pin
_AK_17-Aug-06 0:24
_AK_17-Aug-06 0:24 
QuestionOnSelectedIndexChanged not firing for first selected item in a DropDownList Pin
spoa17-Aug-06 0:12
spoa17-Aug-06 0:12 
Hi there...

I have a user control (UC) which is dynamically added to a page. In this UC I have a DropDownList (DDL) (normally added - not dynamically). The problem is that the item which is set selected in the beginning in the DDL wont fire the OnSelectedIndexChanged event. In the beginning the item is selected – then I choose another item and it fires the OnSelectedIndexChanged event. When I then select the first selected item again the event isn't fired.
I don’t set the selected item in the beginning so it is the first item – but I have tried to set it as an item somewhere in the middle and then that item wont fire the event. So it has something to do with the first selected item.

Here’s my code...

The page which dynamically adds the user control:

m_plhTableForm.Controls.Clear();  //placeholder for the user control<br />
UserControl ucTableForm = null;<br />
<br />
switch( strTableID )<br />
{<br />
  ...<br />
  case CConstants.DB2ID_BUNKANUMER:<br />
    ucTableForm = (UserCtrls_Tableforms_Bunkanumer_UC) this.LoadControl( "~/UserCtrls/Tableforms/Bunkanumer_UC.ascx" );<br />
    break;<br />
  ...<br />
  default:<br />
    ucTableForm = null;<br />
    break;<br />
}<br />
<br />
if( ucTableForm != null )<br />
{<br />
  ucTableForm.ID = "WebUserCtrl1";	<br />
  m_plhTableForm.Controls.Add( ucTableForm );<br />
}


The User Ctrl – aspx file (took out the brackets for rendering):
 <br />
asp:DropDownList ID="m_cboBUNK" runat="server" CssClass="controlText" AutoPostBack="true" OnSelectedIndexChanged="onCboBUNKSelectedIndexChanged" /asp:DropDownList<br />


The User Ctrl – codebehind file:
Nothing big done here – data fetched and databinded to the DDL
AnswerRe: OnSelectedIndexChanged not firing for first selected item in a DropDownList Pin
minhpc_bk17-Aug-06 15:57
minhpc_bk17-Aug-06 15:57 
QuestionError Occurs in Datagrid Paging!....... Pin
Prabs frm PGP17-Aug-06 0:09
Prabs frm PGP17-Aug-06 0:09 
AnswerRe: Error Occurs in Datagrid Paging!....... Pin
Grapes-R-Fun17-Aug-06 6:00
Grapes-R-Fun17-Aug-06 6:00 
QuestionSome Interview Question , Dammmmmmmm Urgent Plz Pin
VishalSharmaDev16-Aug-06 23:57
VishalSharmaDev16-Aug-06 23:57 
AnswerRe: Some Interview Question , Dammmmmmmm Urgent Plz Pin
Jesse Squire17-Aug-06 1:03
Jesse Squire17-Aug-06 1:03 
AnswerRe: Some Interview Question , Dammmmmmmm Urgent Plz Pin
leckey17-Aug-06 7:33
leckey17-Aug-06 7:33 
AnswerRe: Some Interview Question , Dammmmmmmm Urgent Plz Pin
Ramasubramaniam17-Aug-06 7:45
Ramasubramaniam17-Aug-06 7:45 
AnswerRe: Some Interview Question , Dammmmmmmm Urgent Plz [modified] Pin
Uma Kameswari17-Aug-06 18:15
Uma Kameswari17-Aug-06 18:15 
GeneralRe: Some Interview Question , Dammmmmmmm Urgent Plz Pin
Ramasubramaniam18-Aug-06 5:08
Ramasubramaniam18-Aug-06 5:08 
GeneralRe: Some Interview Question , Dammmmmmmm Urgent Plz Pin
Uma Kameswari18-Aug-06 19:46
Uma Kameswari18-Aug-06 19:46 
GeneralRe: Some Interview Question , Dammmmmmmm Urgent Plz Pin
Ramasubramaniam21-Aug-06 3:44
Ramasubramaniam21-Aug-06 3:44 
QuestionRole based Sitemap node listing Pin
Tiger45616-Aug-06 23:28
Tiger45616-Aug-06 23:28 
AnswerRe: Role based Sitemap node listing Pin
Mike Ellison17-Aug-06 3:19
Mike Ellison17-Aug-06 3:19 
GeneralRe: Role based Sitemap node listing Pin
Tiger45617-Aug-06 18:32
Tiger45617-Aug-06 18:32 
GeneralRe: Role based Sitemap node listing Pin
Mike Ellison18-Aug-06 5:18
Mike Ellison18-Aug-06 5:18 
GeneralRe: Role based Sitemap node listing Pin
Tiger45621-Aug-06 5:51
Tiger45621-Aug-06 5:51 
Questiondownload a file on a button click Pin
Sivaprasad C16-Aug-06 21:51
Sivaprasad C16-Aug-06 21:51 

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.