Microsoft Content Management Server - user Control Post Back = No Go :(

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > May 2004 > user Control Post Back = No Go :(





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author user Control Post Back = No Go :(
Trevor Grant

2004-05-30, 10:45 am

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......
>
>
>.
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com