hello friends
This is to add javascript for Textbox in Tabcontainer
Hope This will Help
All The Best
This is to add javascript for Textbox in Tabcontainer
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <form id="form1" runat="server"> <%@ page language="VB" autoeventwireup="false" codefile="Default.aspx.vb" inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head runat="server"> <title>Untitled Page</title> <script language="javascript" type="text/javascript"> function Callme() { document.getElementById("TabContainer1_TabPanel1_TextBox2").value=document.getElementById("TabContainer1_TabPanel1_TextBox1").value } </script> </head> <body> <asp:scriptmanager id="ScriptManager1" runat="server"> </asp:ScriptManager> <cc1:tabcontainer id="TabContainer1" runat="server" activetabindex="0"> <cc1:tabpanel id="TabPanel1" runat="server" headertext="TabPanel1"> <contenttemplate> <asp:textbox id="TextBox1" runat="server"></asp:TextBox> <asp:textbox id="TextBox2" runat="server"></asp:TextBox> </contenttemplate> </cc1:TabPanel> <cc1:tabpanel id="TabPanel2" runat="server" headertext="TabPanel2"> <contenttemplate> <%--put another control--%> </contenttemplate> </cc1:TabPanel> </cc1:TabContainer> </form> </body> </html>
Partial Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)Handles Me.Load TextBox1.Attributes.Add("onkeyup", "Callme();") End Sub End Class
Hope This will Help
All The Best
No comments:
Post a Comment