467,075 Members | 975 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,075 developers. It's quick & easy.

Postback after clicking a button doesn't react not for first time in a UserControl?

I've a webapplication with UserControls. When I click on a menu-item or a select-button in a grid, than I see that didn't react the first time. When I clicked for the second time then an event behind the button will fire.

What do I wrong? I've given the components a unique ID and the events are in the cs-files.

Expand|Select|Wrap|Line Numbers
  1.            <asp:Menu ID="TabMenu" Width="100%" Height="25px" runat="server"        
  2.                     Orientation="Horizontal" CssClass="TabPages"
  3.                     StaticEnableDefaultPopOutImage="False"
  4.                      AutoPostBack="true" 
  5.                      OnMenuItemClick="DoMenuItemClick" >
  6.                 <Items>
  7.                     <asp:MenuItem Text="Domeinen" Value="0"></asp:MenuItem>
In this case for the first time, when you clicked on a menu-item, it looks like the page only is reloaded. And when clicks for the second time, the event really fires. In this example when you clicks on a menu-item, the right View is shown.

The ID's have a fixed name.
The AutoPostBack is set to True.
There is an event linked.
The grids has DataBinded.
There is site.master a default.aspx and the UserControls are placed in a Placeholder.

I hope someone can help me.

thanks.
Aug 30 '12 #1
  • viewed: 1661
Share:

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Dennis | last post: by
2 posts views Thread by Frank | last post: by
2 posts views Thread by Patrick Jox | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.