user Control Post Back = No Go :(
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > user Control Post Back = No Go :(




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    user Control Post Back = No Go :(  
Trevor Grant


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-30-04 03:45 PM

Hi Scott

It also does not work if you took the DropDownList out of
the User control and placed it directly into the Template
File.

There is a postback. But the event handler is not getting
called.

And here's when it gets really weird: I removed
AutoPostBack=true from the DropDownList and the event
handler was called...strange.

Trevor

>-----Original Message-----
>I have a simple User Control I would like to capture on a
post back.
>
><asp:DropDownList id="ddl" runat="server"
autopostback="true">
>   <asp:ListItem value=" />
>   <asp:ListItem value="myValue">my value</asp:ListItem>
></asp:DropDownList>
>
>Then in the code behind of the ascx
>
>protected DropDownList ddl
>
>Inside OnInit()
>ddl.SelectedIndexChanged += new
>System.EventHandler(ddl_SelectedIndexChanged)
>
>then
>private void ddl_SelectedIndexChanged(object s, EventArgs
e)
>{   string value = ddl.SelectedValue;    }
>
>
>and the post back is not firing the event.
>
>I know this code is correct (what I just typed isn't the
code, it's free
>hand, but still should be correct barring typos) to fire
the event, but
>somehow CMS is interfering.
>
>Thanks for the help......
>
>
>.
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:38 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register