Saturday, March 24, 2012

tab panel header text not changing programaticlly??

Hi All, I am using AJAX tabcontainer in my one of the web application. This application needs to be support english as well as japanese language. I had tried to change tabpanel1 text at run time by resource file(.resx file) and using Tabcontainer.Tabs[0].HeaderText property. But still tabpanel1 is coming on webpage. If i make the changes at design time, it is working fine. Please let me know if anyone has idea over same. Thanks In Advance Arnold

Can you post your code?

------------------
When you ask a question, remember to click "mark as answered" when you get a reply which answers your question.


Hi,Pls find code for changing the tabpanel text at run time: TabContainer1.Tabs[0].HeaderText = Resources.Resource.tabpanel1; TabContainer1.Tabs[1].HeaderText = Resources.Resource.tabpanel2;Please let me know what I am doing wrong?Thanks Arnold.
Any idea?

In which event do you use the code you provided?


In page_load function.

Are you creating any of the objects dinamically?


No, I have created same at design time.Thanks & Regards,Arnold

Oh, yes. One more question... What version of Visual Studio are you using?


What version of the toolkit are you using?

Try just setting your header to a fixed string to eliminate the complexity, e.g. TabConainer.Tabs[0].HeaderText = "Testing" or TabPanel1.HeaderText = "Testing";

You also should be able to do something like HeaderText="<%$Resources:myResources, Welcome %>" in the ASPX. Seehttp://www.codeproject.com/useritems/localization.asp for more information.

-Damien


Hi Guys,

I am using ASP.NET 2.0 AJAX Extensions toolkit and I had already tried both ways few days back, but this was not working, that's why I have droped a forum here :-)

Please let me know whether this is a bug, or how can i fix this?

Thanks & Regards,

Arnold.


When you set a static string (e.g. TabContainer.Tabs[0].HeaderText = "Testing" or TabPanel1.HeaderText = "Testing";), do you still have the issue?

Assuming you do, it sounds to me like something in your code is overwriting your dynamic assignment. This is not a bug with the Toolkit as I have done this with version 10920.

By the way, you are confusing two different technologies... "ASP.NET 2.0 AJAX Extensions toolkit" isn't a version of the Toolkit. TheASP.NET AJAX 1.0 Extensions provide you with the UpdatePanel, ScriptManager, etc. while theAJAX Control Toolkit gives you all the extra controls like the Tabs, Accodion, etc. When I asked what version of the Toolkit you were using I was refering to the build number.

I suggest you try the 10920 build and see if you still are having the issue:http://www.codeplex.com/AtlasControlToolkit/Release/ProjectReleases.aspx?ReleaseId=4941. If you are, all signs point to a bug in your code. In that case, step through your program putting a watch on the TabPanel1.HeaderText seeing where it ends up being changed.

-Damien


Hi,I apologize for giving wrong information. Actually I am using ASP.NET 2.0 AJAX Extension and AJAX toolkit version 1.0.10920.0 both.And even I had tried in all the ways:TabContainer1.Tabs[0].HeaderText = "sample app";TabContainer1.Tabs[0].HeaderText = Resources.Resource.tabpanel1;in aspx file,">But nothing is working.In watch window, right value is displaying but on GUI, value is same as the design time value.Any efforts regarding same will be appreciated as this minor issue is taking so much of time.Thanks & Regards,Arnold

Ok, with 10920, I know for a fact it works. There is a problem somewhere in your code, something must be overwriting your tab's header. Do a search for "HeaderText" in your app to see if in fact it is being set somewhere else.

-Damien


Hi Damien,Thanks for reply. Issue has been solved finally.Issue was with headertemplate. headertemplate in aspx. was overwriting the information.Thanks & Regards,Arnold

1 comment:

Post a Comment