Avatar of jyllan
jyllanFlag for Denmark asked on

Where to place javascript code ??? when use ajax toolkit tabpanel


Anybody who knows about where to put a javascript function used in one of the ajax tabpanel.

I have a javascript funtion to reset some textboxes, it succes without ajax tab, but when I use the ajax toolkit tabpanel,
nothing happens.

Hi tion

Yes I have tried without succes.

See my Visual studio 2008 code down here, if you take the javascript code and use it without tabcontainer/tabpanel it is well doing.

So if anybody know what to do with tabs, it will be nice the see how.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Administration_Default2" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title>Untitled Page</title>


<script type= "text/javascript">

function contactchangevalue()


this.form1.TextBox1.value = "";

this.form1.TextBox2.value = "";



<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">


<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1"


<cc1:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">


<cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">


<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>

<br />

<br />

<asp:Button ID="Button1" runat="server" Text="Button" />

<asp:Button ID="Button2" runat="server" OnClientClick ="contactchangevalue()" Text="Reset" />




<br />


<br />




ASP.NETJavaScriptWeb Development

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Excellent !!!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck