Click here to Skip to main content
11,430,109 members (73,677 online)
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  
Comments
sanjayjaiswal at 28-Apr-15 2:29am
   
CausesValidation="false" is working for me..
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Thanks a lot for this help..it saves a lot to me....I was struggling for a day for fixing this kind of issue...
  Permalink  
Comments
Deepu S Nair at 28-Apr-15 3:07am
   
Don't post your comment as solution.

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



Advertise | Privacy | Mobile
Web02 | 2.8.150428.2 | Last Updated 28 Apr 2015
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