ラベル loaded の投稿を表示しています。 すべての投稿を表示
ラベル loaded の投稿を表示しています。 すべての投稿を表示

2012年3月28日水曜日

Resolving <%=MyControl.ClientID%> in a clientside Script which is loaded via ScriptM

Hi experts and developers!

I have a problem using the <%=MyControl.ClientID%> syntax to resolve controls when using clientside script. I really need this functionality though because the control of which i need the clientside id is generated (and dynamically named) by a third party control (DataGrid) I use.

How is it possible to find out the ClientID of a control when the clientside script is loaded via ScriptManager.RegisterClientScriptInclude()?

Thanks for your help in advance!

Greetings,
Wolfgang

hello.

i think i'm not understanding your question very well. MyControl.ClientID gives you the ID of the client...maybe you just need to concatenate it to the rest of the string that is being register as script so that it works...can you show us the code where you're having the problem?


Hi Luis!

Your solution sound absolutely reasonable, but as i use a separate JavaScript File, the <%= %> syntax won't work. And also it does not sound to practicable to change the JavaScript file at runtime (all the time, because the ClientID of the controls changes).

I found a solution already though: I'm just using ClientScript.RegisterArrayDeclaration(MyClientID, myControl.ClientID) on Page_PreRender()... After that I can access the ClientID in my JavaScritp File just via MyClientID[0] as it is a normal js array.

Thanks for the reply!
Wolfgang


hi.

i'd do something like that too if i had the script in a separate file (which is really the recommended approach for script files:))

2012年3月21日水曜日

RoundedCornersExtender - postback flashing

I get 'flashing' when using the roundedcornerextenders

It's as if the style get's applied after the panel is loaded, which causes the panels to make a strange 'shift'

Any workarounds ?

Nothing? Where can I get official support for the toolkit?

I need to make a decision here on a project whether to use the toolkit, it all depends on support.