Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET4.0
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 12:18pm
Edited 23-Sep-12 12:22pm
v2
Comments
aajeesh at 24-Sep-12 0:18am
   
Dear harrypsd1789 Yuor code works fine for me..
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

have checked with
 UpdateMode="Conditional"
then trigger will works
and also check the
click event name
OnClick
  Permalink  
v2
Comments
Kishor Khatri at 5-Sep-14 6:53am
   
Thanks S.P.Tiwari...
Its Worked for me...
Thanks for your answer or help
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

your code works for me, just try to use a hyperlink instead of a button & then link that login.aspx to that hyperlink
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 476
1 Sergey Alexandrovich Kryukov 235
2 CHill60 195
3 Afzaal Ahmad Zeeshan 145
4 TheRealSteveJudge 120
0 Sergey Alexandrovich Kryukov 9,121
1 OriginalGriff 7,920
2 Peter Leow 4,774
3 Kornfeld Eliyahu Peter 3,210
4 Maciej Los 2,176


Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 24 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100