Ajax Control toolkit ----Tab control ---Button click event is not firing

 

Hi frds

i'm using ajax control toolkit controls in my web application

i have done an application which uses tab control

login tab and register tab

for both the bustton event is not firing

here is the code in html

 <%@ Page Language="VB" MasterPageFile="~/DefaultMaster.master" AutoEventWireup="false" CodeFile="Tab1.aspx.vb" Inherits="Tabs_Tab1" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="SampleContent" Runat="Server">
<ajaxToolkit:ToolkitScriptManager ID="script1" runat="server"></ajaxToolkit:ToolkitScriptManager>
<script type="text/javascript">
        function PanelClick(sender, e) {
            var Messages = $get('<%=Messages.ClientID%>');
            Highlight(Messages);
        }

        function ActiveTabChanged(sender, e) {
            var CurrentTab = $get('<%=CurrentTab.ClientID%>');
            CurrentTab.innerHTML = sender.get_activeTab().get_headerText();
            Highlight(CurrentTab);
        }

        var HighlightAnimations = {};
        function Highlight(el) {
            if (HighlightAnimations[el.uniqueID] == null) {
                HighlightAnimations[el.uniqueID] = AjaxControlToolkit.Animation.createAnimation({
                    AnimationName : "color",
                    duration : 0.5,
                    property : "style",
                    propertyKey : "backgroundColor",
                    startValue : "#FFFF90",
                    endValue : "#FFFFFF"
                }, el);
            }
            HighlightAnimations[el.uniqueID].stop();
            HighlightAnimations[el.uniqueID].play();
        }
        
        function ToggleHidden(value) {
            $find('<%=Tabs.ClientID%>').get_tabs()[2].set_enabled(value);
        }
    </script>
<div class="demoarea">
        <div class="demoheading">Tabs Demonstration</div>
       Used controls "Tab,Rating,Password Strength,Validation"
        <br /><br />
        
        Toolkit Login:
        <ajaxToolkit:TabContainer ID="tabs" runat="server"
                Height="138px" ActiveTabIndex="0" width="500px"
                OnClientActiveTabChanged="ActiveTabChanged">

<ajaxToolkit:TabPanel ID="panel2" runat="server" HeaderText="Login">
                <ContentTemplate>
                    <asp:UpdatePanel  ID="uPanel2" runat="server">
                        <ContentTemplate>
                        <table>
                        <tr>
                        <td>
                        <asp:Label id="lblUserName" runat="server" text="Enter UserName"  font-bold="true">
                        </asp:Label>
                        </td>
                        <td>
                        <asp:TextBox id="txtUserName" runat="server"></asp:TextBox>
                        </td>
                        </tr>
                        <tr>
                        <td>
                        <asp:Label id="lblPassword" runat="server" text="Enter Password"  font-bold="true">
                        </asp:Label>
                        </td>
                        <td>
                        <asp:TextBox id="txtPassword" runat="server" textmode="password"></asp:TextBox>
                        </td>
                        </tr>
                        </table>
                        <br />
                        <asp:RequiredFieldValidator id="NReq1"
                        runat="server"
                        ErrorMessage="<b>Required Field Missing</b><br />A user name is required."
                        Display="None" ControlToValidate="txtUserName">
                        </asp:RequiredFieldValidator>
                        <ajaxToolkit:ValidatorCalloutExtender id="NReq1E"
                        runat="Server" __designer:wfdid="w187" TargetControlID="NReq1" HighlightCssClass="validatorCalloutHighlight"></ajaxToolkit:ValidatorCalloutExtender>
                        <asp:RequiredFieldValidator id="NReq2" runat="server"
                         __designer:wfdid="w188"
                         ErrorMessage="<b>Required Field Missing</b><br />Password is required." Display="None" ControlToValidate="txtPassword">
                        </asp:RequiredFieldValidator>
                        <ajaxToolkit:ValidatorCalloutExtender
                        id="Nreq2E" runat="server" __designer:wfdid="w189"
                        TargetControlID="NReq2" HighlightCssClass="validationCalloutHighlight">
                        </ajaxToolkit:ValidatorCalloutExtender>
                        <br />
                        <asp:Button id="btnLogin" onclick="btnLogin_click" runat="server"
                        text="Login" __designer:wfdid="w190">
                        </asp:Button>
                        <br />
                        <asp:UpdatePanel id="upLogin" runat="server" __designer:wfdid="w191">
                        <ContentTemplate>
                        <asp:Label id="lblMsgLogin" runat="Server" __designer:wfdid="w192"></asp:Label>
                        </ContentTemplate>
                        <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnLogin" EventName="Click"></asp:AsyncPostBackTrigger>
                        </Triggers>
                        </asp:UpdatePanel>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </ContentTemplate>
            </ajaxToolkit:TabPanel> 
           
            <ajaxToolkit:TabPanel ID="panel3" runat="server" HeaderText="Register">
                <ContentTemplate>
                    <asp:UpdatePanel id="uPanel3" runat="server">
                        <ContentTemplate>
                        <table>
                        <tr>
                        <td>User Name: </td>
                        <td><asp:TextBox id="txtUsrName" runat="server" __designer:wfdid="w212"></asp:TextBox></td>
                        </tr>
                        <tr>
                        <td>Password:</td>
                        <td><asp:TextBox id="TextBox1" runat="server" __designer:wfdid="w213" textmode="Password" autocomplete="off" Width="150"></asp:TextBox>
                        <br />
                        <asp:Label id="TextBox1_HelpLabel" runat="server" __designer:wfdid="w214"></asp:Label>
                        <ajaxToolkit:PasswordStrength
                        id="PasswordStrength1" runat="server"
                        __designer:wfdid="w215" TargetControlID="TextBox1"
                        RequiresUpperAndLowerCaseCharacters="false"
                        MinimumSymbolCharacters="0"
                        MinimumNumericCharacters="0"
                        StrengthStyles="TextIndicator_TextBox1_Strength1;TextIndicator_TextBox1_Strength2;TextIndicator_TextBox1_Strength3;TextIndicator_TextBox1_Strength4;TextIndicator_TextBox1_Strength5"
                        TextStrengthDescriptions="Very Poor;Weak;Average;Strong;Excellent"
                        HelpStatusLabelID="TextBox1_HelpLabel"
                        PrefixText="Strength:" PreferredPasswordLength="10"
                        StrengthIndicatorType="Text" DisplayPosition="RightSide">
                        </ajaxToolkit:PasswordStrength>
                        </td>
                        </tr>
                        <tr>
                        <td>Retype Password</td>
                        <td><asp:TextBox id="txtRetypePwd" runat="server" __designer:wfdid="w216" textmode="Password" autocomplete="off" Width="150"> </asp:TextBox> </td>
                        </tr>
                        <tr>
                        <td>Email </td>
                        <td><asp:TextBox id="txtEmail" runat="Server" __designer:wfdid="w217"> </asp:TextBox> </td>
                        </tr>
                        </table>
                        <br />
                        <asp:RequiredFieldValidator id="NReq" runat="server" __designer:wfdid="w218"
                        ErrorMessage="<b>Required Field Missing</b><br />A user name is required."
                        Display="None" ControlToValidate="txtUsrName">
                        </asp:RequiredFieldValidator>
                        <ajaxToolkit:ValidatorCalloutExtender id="NReqE" runat="Server"
                        __designer:wfdid="w219" TargetControlID="NReq" HighlightCssClass="validatorCalloutHighlight">
                        </ajaxToolkit:ValidatorCalloutExtender>
                        <asp:RequiredFieldValidator id="PNReq" runat="server"
                        __designer:wfdid="w220"
                        ErrorMessage="<b>Required Field Missing</b><br />A password is required."
                        Display="None" ControlToValidate="TextBox1">
                        </asp:RequiredFieldValidator>
                        <ajaxToolkit:ValidatorCalloutExtender id="PNReqE"
                        runat="Server" __designer:wfdid="w221"
                        TargetControlID="PNReq"
                        HighlightCssClass="validatorCalloutHighlight"
                        Width="350px">
                        </ajaxToolkit:ValidatorCalloutExtender>
                        <asp:CompareValidator id="CValid"
                        runat="server" __designer:wfdid="w222"
                        ErrorMessage="<b>Password didn't match.</b>"
                        ControlToCompare="TextBox1" display="None"
                        controlToValidate="txtRetypePwd">
                        </asp:CompareValidator>
                        <ajaxToolkit:ValidatorCalloutExtender
                        id="PwdCValid" runat="Server"
                        __designer:wfdid="w223" TargetControlID="CValid"
                        HighlightCssClass="validatorCalloutHighlight"
                        Width="350px">
                        </ajaxToolkit:ValidatorCalloutExtender>
                        <br />
                        <asp:RequiredFieldValidator id="EReq" runat="server"
                        __designer:wfdid="w224"
                        ErrorMessage="<b>Required Field Missing</b><br />Emial is required."
                        ControlToValidate="txtEmail"
                        display="None">
                        </asp:RequiredFieldValidator>
                        <ajaxToolkit:ValidatorCalloutExtender id="EReqE"
                        runat="server" __designer:wfdid="w225"
                        TargetControlID="EReq" HighlightCssClass="validatorCalloutHighlight">
                        </ajaxToolkit:ValidatorCalloutExtender>
                        <asp:Button id="btnRegister" onclick="Register_OnClick"
                        runat="server" text="Register" __designer:wfdid="w226">
                        </asp:Button>
                        <asp:UpdatePanel id="up1" runat="server" __designer:wfdid="w227">
                        <ContentTemplate>
                        <asp:Label id="lblMessage" runat="server" __designer:wfdid="w228"></asp:Label>
                        </ContentTemplate>
                        <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnRegister" EventName="Click"></asp:AsyncPostBackTrigger>
                        </Triggers>
                        </asp:UpdatePanel>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </ContentTemplate>
            </ajaxToolkit:TabPanel>
        </ajaxToolkit:TabContainer>
         <br /><br />
       
        Current Tab:
        <asp:Label runat="server" ID="CurrentTab" /><br />
        <asp:Label runat="server" ID="Messages" />
</div>

</asp:Content>

 

 

in code behind

    Protected Sub Register_OnClick(ByVal sender As Object, ByVal e As System.EventArgs)
        lblMessage.Text = String.Format("You have registered sucessfully .You can login by this username {0}.",    txtUsrName.Text)

    End Sub
    Protected Sub btnLogin_click(ByVal sender As Object, ByVal e As System.EventArgs)
        lblMsgLogin.Text = "LoginFailed"
    End Sub

 

these 2 events are not firing when i click the buttons

plz help me to solve out this

can any one say where i'm going wrong

thank u

Archu
0
archu136
11/21/2007 12:47:52 PM
asp.net.ajax_control_toolkit 17816 articles. 1 followers. Follow

1 Replies
1768 Views

Similar Articles

[PageSpeed] 30
Get it on Google Play
Get it on Apple App Store

<asp:Button id="btnLogin" onclick="btnLogin_click" runat="server"
                        text="Login" __designer:wfdid="w190">
                        </asp:Button>

** Remove onclick="btnLogin_click"

** Add handler:

Protected Sub btnLogin_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click
        lblMsgLogin.Text = "LoginFailed"
    End Sub

 


Validation Complete
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
I'll always mark your post(s) as answer when it is!
0
NNM
11/21/2007 1:32:51 PM
Reply:

Similar Artilces:

Page and Control Flashing Using AJAX Control Toolkit Controls
Page and Control Flashing Using AJAX Control Toolkit Controls I'm using IE7 and the ASP.NET AJAX Control Toolkit.  I'm using two controls -- Accordion and CollapsiblePanelExtender.  I'm actually using 2 CollapsiblePanelExtenders, and the Accordion control is inside one of the panels for the CollapsiblePanelExtender (see the code below). The problem I'm seeing is that when I click an Accordion pane to open/close it or click the CollapsiblePanelExtender panel to open/close the panels, the controls and page flash while the animation is in progess.  Everything el...

Ajax Control Toolkit: Control cannot be created because Visual Studio cannot find the control's type in the control assembly.
Hi All, Good Day.  I am using ASP.Net 2.0 Framework, i have downloaded Ajax 3.0 and added reference into the project. But i am not able to add controls to the page. When i tried to add control into the page getting following error message "Control cannot be created because Visual Studio cannot find the control's type in the control assembly". I checked some forums on the web, added references in Web.Config. Still not able to proceed further. Please revert asap.  Thanks. AJAX 3.0 not work in 2.0 Framework its work in 3.5 Framework try to download another ...

Ajax Control Toolkit extenders to controls in VS 2008 not visible from control prompt
 Joe Stagner on this video shows how to have Ajax Control Toolkit intergrated into VS 2008.There is one moment that he sais, that after the toolkit is added, web controls in VS are "extensions-aware", i.e the little arrow is displayed near the example asp:Button control with an option to "Add Extender" and then choose from the available extender for this control from the automatically generated list. I do not have this "little arrow" and i do have VS 2008 TE, .NET 3.5 and Ajax Control Toolkit referenced in my toolbox.Any ideas? Łukasz Podolak Hi Podi...

Ajax control toolkit-modal popup-how to get btn click event.
 hi, i have used modal popup extender in my webpage with vb code, and want to update or insert data in database so how can i do this. i have used following code but not able to get debugging on click event of save and cancel button in code behind.1) what is the problem with script or code?2) what is the solution?3) if any in one have good demo for modal popup extender please help it..Thanks...  in abc.aspx page<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1"%>  <asp:Content ID="Content1" ...

Table Cell click event
Hi, I used to have a custom server control inhirted from TableCell control to implement click event in VS.NET 2003.  When I use the custom control in VS.NET 2003 Web application (dynamically adding to table object), everything works fine.  Below is the code from 2003 project, and everything works good in this way.                 Dim c As New MyCustomTableCell                  c.Width = 200     &nb...

Ajax Control Toolkit
Hi,  I'm new to Asp.net Ajax I tried to create an Ajax Rating control dynamically in my site. The rating control is included inside a placeholder and when the user click on the submit button the current rating value of the rating control is added to the database.  But the problem is when the client click on the submit button (when the page is refreshed) , Current Rating of the control set back to zero.  The user selected value is vanished.   my code is as follows // code for creating the rating control dynamically  AjaxControlToolkit.Rating Rating_Feedb...

Ajax Control Toolkit not bringing up all the controls that it should
Hello, I have installed Ajax on my computer and it has finally worked. My collagues are using the same installations files that I used but they are not seeing all the Ajax Controls that I am seeing. I have from Accordion to Validator CalloutExtender. They don't have this toolbox Ajax Ext? Do you know what could have happened. If there is a certain order or If they need to configure something differently. Please help.. Thanks !!!Tatiana Kingking.tatiana@gmail.comcel:(561)699-4493 There is the extensions and the toolkit. You probably have both. They don'tPlease "Mark As...

AJAX Control Toolkit with Wizard Control
Hi there,  I am trying to add a 4 stage wizard control to a modal popup control and keep it up for the duration of the wizard. However every time the 'Next' button is pressed, the Modal popup window closes but the wizard moves on a step. I know this because next time you press the button to activate the wizard it comes up on the next stage. Is it possible to keep it open throughout the entire wizard process? Thanks, Matt MattSystems Engineer / ASP.NET Web Developermbaughan@raecomputing.com Are you using an update panel with the wizard control so the page doesn't do a ful...

AJAX Control Toolkit controls in a UserControl
Hi guysSorry if this has been asked many times before - I did a quick forum search and couldn't find anyone who had asked or answered this before.I'm having trouble with where to position a ScriptManager control when wanting to put an Accordion control in a User Control for re-use across multiple master pages.If I place the ScriptManager in a MasterPage, the UserControl gives an error message along the lines of "The control with ID 'accMenu_AccordionExtender' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it" But if...

AJAX Control Toolkit + hosting a control
My host has recently added support for AJAX Extensions 1.0 (they do not mention the Control Toolkit though) and I would like to add a slider control from the toolkit to my site. So I have some questions... (1) Will controls taken from the control toolkit work online or does the hoster have to have the AjaxControlToolkit.dll on their server ?  (2) If the web host does not have AjaxControlToolkit.dll, can I just include it in my site ? If I can, how do I reference it (I am currently just taking the control from my toolbox but surely this will set a reference to wherever I have...

No Intellisence on Ajax Control Toolkit Controls
Intellisence of AjaxControlToolkit's controls won't work if I open my projects from a mapped network drive. any ideas?...

Adding events to controls, e.g. adding a click event to a label control
 Hi, Is it possible to add a click event to a label control so that one can make something happen when a user clicks the label? How can it be done? One could of course use a linkbutton control, which has an in-built click event. Unfortunately a linkbutton insists on doing a postback every time it is clicked.Thank you!Regards.   Label is span control in html call javascript onclick event <span id="fkdsjfl" onclick=" ">here</span> if you want to call postback event then chk ithttp://forums.devx.com/showthread.php?t=142257 If this post...

Problem with Accordian control
Hi, I have a user control with some text boxes and a postback button.I placed the the user control inside an accordian pane.  The problem is when you do a post back by clicking the button on the user control, the button click event is not getting fired and the values in the text boxes also getting cleared. Is this a bug or am i missing something ? ThanksRukshan ...

Nobot Ajax control toolkit and login control
I´m trying to use NoBot control in a web application. This application have a .NET login control in the login page that validate users.  I want to provide captcha with a nobot control to the login page but i received the next status errror "InvalidBadResponse" because the login control refresh twice aand the second time is when nobot control this is the html code <body onload="inicio()"> <div id="principal" class="inicio"> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div id="cabecera"><img ...

Can you skin the controls in the ajax control toolkit?
If the answer is yes are there any examples?  In particular write now, I need an accordion style control panel and would like to make the panel headers look and function like the control panel in Outlook 2007.  Thanks.  Kris Yes, check out: http://asp.net/ajax/control-toolkit/live/Accordion/Accordion.aspx Look at the properties:     HeaderCssClass="accordionHeader"    HeaderSelectedCssClass="accordionHeaderSelected"    ContentCssClass="accordionContent" -DamienVisoft, Inc - Home | Blogs Latest Bl...

Web resources about - Ajax Control toolkit ----Tab control ---Button click event is not firing - asp.net.ajax_control_toolkit

Button - Wikipedia, the free encyclopedia
In modern clothing and fashion design , a button is a small fastener , now most commonly made of plastic , but also frequently of metal, wood ...

50,000 Websites Add Facebook's Like Button And Social Plugins In First Week
50,000 Websites Add Facebook's Like Button And Social Plugins In First Week

Feature Request: iCloud Photo Library needs a purge downloads button à la Google Photos
... but it’s not perfect at knowing. Google Photos (which is free but uses its own app) takes a different approach by putting a great big button ...

Twitter Launches Conversational Ads: Tweets With Call-to-Action Buttons
... ads. Similar to its poll feature , this ad format allows users to engage with the sponsored tweet via custom hashtags or call-to-action buttons ...

Push our Buttons
For whatever it's worth, we have brought back our Twitter and Facebook buttons. Please use them if that is something you like to do. We get ...

Say ‘so long’ to the shutter button with the Selfie Stick app
... more people or surroundings in their shots. A new app called Selfie Stick is a tool that lets you take a selfie without hitting any buttons, ...

Withings expands fitness family with button-sized, e-ink Go tracker
The $69 device is the company's least expensive and most versatile tracker.

$15 screen protector adds an invisible back button to your iPhone
This is one you have to see to believe. How many times have you wished that there was a physical back button on the bottom of your iPhone? Instead ...

Intel shows how this button-sized chip could revolutionize live sports
... its CEO Brian Krzanich on-stage for its keynote speech earlier this week. The action-packed performance was done to showcase its new button-sized ...

Whirlpool’s “Smart” Appliances Now Come Equipped With Amazon Dash Buttons
When Amazon introduced the Dash Button, it claimed customers could easily reorder products with the simple push of a button . While the small ...

Resources last updated: 1/19/2016 3:29:12 AM