|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Web User Controls(ascx) 1.1 VS 2.0I writed a user controls in vs2003, it's work fine, recently i move it to
VS2005, open IE, everything is fine, but when i open the firefox, the control can not run, the control use client side javascript, so i check the firefox's javascript console, it show a error: myControlID(in ascx)_controlID(in aspx) not found, i open the Vs2003 & 2005 web page from IE & FireFox and view the rend out html page source, i found the control ID in page source is different: in vs2003 page IE & Firefox is myControlID(in ascx):controlID(in aspx) in vs2005 page IE myControlID(in ascx):controlID(in aspx) but Firefox is myControlID(in ascx)$controlID(in aspx) the different is ':' & '$' i don't know the exact problem is, can anyone help me, thanks. -- Pony Tsui Hi Pony,
Thank you for your post. Based on my understanding, the problem is: you're reference some server control in your client-side javascript and found that the generated control id is different in different browser. If I've misunderstood anything, please feel free to post here. It is recommended that you do not rely on directly referencing the IDs as you can see them in the browser. The formula used to generate unique IDs for child controls can change. Instead, get the value of the child control's ClientID property and use that value to reference the child control. For more info, please refer to following MSDN documentation: #Client Script in ASP.NET Web Pages http://msdn2.microsoft.com/en-us/3hc29e2a.aspx#IdentifyingServerControlsInCl ientScript Regards, Walter Wang Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights.
how to get the text in JS of a cell created on server?
why does this not work? Retrieving Asp.treeview checked checkbox information Uploading to a folder outside the www ... ? can get forecolor but not background color in Javascript FormView/Repeater/ Eval(FormView data) questions about Controls.add HyperLink control vs. Firefox ASP.Menu in IE6, cannot select menu item when... multiple datagrids on same page paging broken |
|||||||||||||||||||||||