Click here to Skip to main content
Sign Up to vote bad
good
See more: asp.net4
This is the second time im putting this question online. Sorry for that but I still cant get a way to fire a button event inside an update panel;
ID="UpdatePanel3" runat="server" UpdateMode="Always">
       <ContentTemplate>
           <asp:Panel ID="Panel3" runat="server" CssClass="HellowWorldPopup">
 
           <legend style="font-family: Tahoma; font-size: small; font-weight: bold; font-style: normal; font-variant: normal; text-transform: none; color: #000000; text-decoration: blink"> ICT UNAUTHORIZED USER
      </legend>
               <asp:Button ID="Button3" runat="server" Text="Button"  Style="display:none" />
               <asp:Button ID="Button4" runat="server" Text="OK" onclick="Button4_Click"
                   CausesValidation="true"/>
               <asp:Label ID="Label7" runat="server" Text="Label"></asp:Label>
               &nbsp;</asp:Panel>
           <asp:ModalPopupExtender ID="ModalPopupExtender12" runat="server" PopupControlID="Panel3" Enabled="true"
               TargetControlID="Button3">
           </asp:ModalPopupExtender>
 
       </ContentTemplate>
       <Triggers>
            <asp:AsyncPostBackTrigger ControlID="Button4" EventName="Click" />
 

          </Triggers>
   </asp:UpdatePanel>
I really dont know what the issue is and need some real help now please....
 
then in C# :
protected void Button4_Click(object sender, EventArgs e)
    {
        Response.Redirect("Login.aspx");
    }
Posted 23 Sep '12 - 11:18
Edited 23 Sep '12 - 11:22

Comments
aajeesh - 24 Sep '12 - 0:18
Dear harrypsd1789 Yuor code works fine for me..

3 solutions

your code works for me, just try to use a hyperlink instead of a button & then link that login.aspx to that hyperlink
  Permalink  
Have you handled/defined validating event?
control causes validation and might be possible u didn't handle this.
 
try to execute without
CausesValidation="true"
or with
CausesValidation="false"
and see.
  Permalink  
have checked with
 UpdateMode="Conditional"
then trigger will works
and also check the
click event name
OnClick
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 239
1 OriginalGriff 188
2 Mahesh Bailwal 139
3 Maciej Los 135
4 Aarti Meswania 98
0 Sergey Alexandrovich Kryukov 10,214
1 OriginalGriff 7,819
2 CPallini 4,181
3 Rohan Leuva 3,522
4 Maciej Los 3,089


Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 24 Sep 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid