Hi, I need to ask a question for laguage selection. But the code and control for changing the language are in an ascx page. For now I do this:
I put this in my code
<input id="funcLangue" style="WIDTH: 92px; HEIGHT: 22px" type="hidden" size="10" name="funcLangue" runat="server">4
and that for the button
<img src=En.jpg> border=0>
My javascript code place information in the hidden input and then call a postback to call a sub in my vb.net code.
function LangueEn()
{
if(confirm("Keep your language selection for your next visits?"))
{
document.forms['Defaut'].elements['Menu_funcLangue'].value = "English";
__doPostBack('Menu$ChangeLangue', '');
}
}
My user control i used in myna page with different root deep. I try to bu consistent and all the aspx page using this menu.ascx as a form named "defaut". All page are en link to the menu.ascx whit the same tagname like this:
<%@ Register TagPrefix="Baultar" TagName="Menu" Src="../Controles/User/Menu/Menu.ascx" %>
The problems when i am in the index.aspx page alle work good, if I go to another aspx page using this menu.ascx I got an error ("Objet is null") on the line
document.forms['Defaut'].elements['Menu_funcLangue'].value = "English";
After some research, I found that asp.net change the name of my control. My program supposed that the name is always menu_funcLangue to asp.net change it to menu1_funcLangue. Why?
Meaby i do all this with the wrong method. Somebody have some suggestions?
Thansk a lot