 |
|
 |
The code works well. However, I don't want the data to be loaded every time a user switches tabs. But only the first time the user clicks the tab.
How do we alter the code so that, it only does postback on the first click, thereafter, it does not reload the data nor postback?
|
|
|
|
 |
|
 |
I seem to hit a problem with this control when using it on a masterpage.
a google shows there are many with the same problem.
any ideas?
the problem is that the active index is lost between posybacks...
|
|
|
|
 |
|
 |
hi
i m using ajax tab control as menu.
when i click any tab , first tab appears as selected tab, i want tab what i select , appear as seleted tab.
i have written
//////on the aspx...
<asp:HiddenField ID="activeTab" runat="server" />
<script type="text/javascript">
function ActiveTabChanged(sender, e) {
var activeTab = $get('<%=activeTab.ClientID%>');
activeTab.value = sender.get_activeTabIndex();
SetActiveTabIndexCookie(activeTab.value);
}
</script>
<MyControls:SuperTabContainer runat="server" id="SuperTabContainer1" OnClientActiveTabChanged = "ActiveTabChanged"; />
//////on aspx page_load...
protected void Page_Load(object sender, EventArgs e)
{
int ActiveTabIndex = 0;
if (Request.Cookies["activetabindex"] != null)
{
try
{
ActiveTabIndex = int.Parse(Request.Cookies["activetabindex"].Value.ToString());
}
catch
{ ActiveTabIndex = 0; }
}
if (ActiveTabIndex > SuperTabContainer1.Tabs.Count || ActiveTabIndex <= 0)
{
SuperTabContainer1.ActiveTabIndex = 0;
}
else
{
SuperTabContainer1.ActiveTabIndex = ActiveTabIndex;
}
HttpCookie cookie = new HttpCookie("activetabindex");
cookie.Value = SuperTabContainer1.ActiveTabIndex.ToString();
Response.Cookies.Add(cookie);
}
//////javascript ref from aspx...
function SetActiveTabIndexCookie(cvalue) {
if(document.cookie != document.cookie)
{
index = document.cookie.indexOf(cookie_name);
}
else
{
index = -1;
}
if (index == -1)
{
document.cookie = 'activetabindex=' + cvalue + ";";
}
}
but when i goe selected tab index on aspx.cs it returns previous index value by cookies.
i want current index value using cookies plz halp me
plz plz plz
|
|
|
|
 |
|
 |
How can I specify which tab should display as the default tab whenever the page loads?
|
|
|
|
 |
|
 |
Hi sir,
I copied ur code nd using it to my page.In my page i could not see the tabs.Simply the page was empty.I've installed both AJAX extensions nd Tollkit.Whts the problem?
|
|
|
|
 |
|
 |
The problem may be related to CSS. Are you getting any error while the pages gets loaded?
Regards
Saanj
There is no foolish question, there is no final answer...
|
|
|
|
 |
|
 |
I'm getting javascript error only.
That error is
Line:51 and Line:123,char:1,Error:'Sys' is undefined,Code: 0 nd Url:http://localhost:1938/TabControl/TabControl.aspx.
This is the error 1ly am getting.Is this problem?Plz help me sir.
Regards,
venkat
|
|
|
|
 |
|
|
 |
|
 |
Hello sir,
Now its working fine for me.1st i simply download ur website nd run.It was not working properly.Now i create new ajax enabled website nd copy ur coding.It automatically create the web config and works fine.I think the problem is in that web config file.Wht s the problem in that?
|
|
|
|
 |
|
 |
Hi,
Yes you need to create an AJAX Enabled Application to use ajax control toolkit. Earlier, you did not create that instead you created a normal web application and your applications' web.config does not have the script resource tag to handle ajax control toolkit. That is why you were getting the error. You could manually add those tags in the web.config to get rid of that error. If you will create an AJAX Enabled Web Site then Visual Studio.NET automatically adds those line into web.config for you and you don't need to worry about those script tags. You did that and hopefully your application is running perfectly.
Regards
Saanj
There is no foolish question, there is no final answer...
|
|
|
|
 |
|
 |
Hello sir,
Yeah.you are right and thanks for ur quick response sir..
Regards
venkat
|
|
|
|
 |
|
 |
Hi sir,
Now its working fine for me.But i want to customize the tabs design.By default itself it's having cssclass and named as 'ajax__tab_xp'.How can i customize the tabs design sir?
Thanks and Regards,
Venkat
|
|
|
|
 |
|
 |
Hi
I want to load different web pages in different tabs instead of different view/controls on same page
I need this that i have let say 3 pages which are related to each other but have extensive code behind them for each page..
so it is not easy to manage all that in one code behind class.
Iz it possile..
if so plz plz mail me at
mian_ghous@yahoo.com
explore the world of imagination and be known as creative
|
|
|
|
 |
|
 |
Sorry for late response. You can use iframes to map different pages and show those in different tabs.
Regards
Saanj
There is no foolish question, there is no final answer...
|
|
|
|
 |
|
 |
Hi,
I used Ajax tab, but it is not working.
Anyone can give me the working code for ajax in asp.net
jackuline
|
|
|
|
 |
|
 |
Hello Jackuline,
Can you please brief what exact problem are you facing? Is AJAX Extension already installed on your system? Is your web application configured to use AJAX Controls. Please check and revert back.
Either you love IT or leave IT...
|
|
|
|
 |
|
 |
Is there a way to customize the tab images and the background of the grid?
Thanks,
Khalil
Khalil
|
|
|
|
 |
|
 |
Hi Khalil,
The background of the grid is not dependant on the AJAX Tab Panel. So you can implement your custom theme and styles to the grid or you can set from the Visual Studio property editor. You can set the tab images by using your own defined CSS.
.tabImg .ajax__tab_hover .ajax__tab_inner
{
height:20px;
margin-left:16px;
background:url(images/tab_up.gif) no-repeat right top;
}
.tabImg .ajax__tab_hover .ajax__tab_outer
{
height:20px;
margin-left:16px;
background:url(img/tab_down.gif) no-repeat right top;
}
<ajaxtoolkit:tabcontainer id="ajxTab" runat="server" cssclass="tabImg" xmlns:ajaxtoolkit="#unknown">
<!--Implementation-->
I hope it helps Khalil.
Either you love IT or leave IT...
|
|
|
|
 |
|
 |
The closing ajaxtoolkit:tabcontainer is not included above. In the tab container definition, I just tried to show you that how can you use the css class property.
Either you love IT or leave IT...
|
|
|
|
 |
|
 |
hi,
i am using ajax tab panel control in my application.my problem is i am not not getting header text of tab panel.
i want to get "tab text" which is clicked.
if u know please help me.
thank u,
anil
|
|
|
|
 |
|
 |
Hi,
Just set the AutoPostBack property of the tab control to true and then use the following line of code for your reference:
Label1.Text = AjxTabContainer.ActiveTab.HeaderText;
I hope it will solve your problem.
Either you love IT or leave IT...
|
|
|
|
 |
|
 |
only activetabindex is populating rest is not working.Auto post back not working
|
|
|
|
 |
|
 |
Would you specify in detail what exactly is not working. Set autopostback property to true.
Either you love IT or leave IT...
|
|
|
|
 |