jrmcdona
asked on
how to pass in a global javascript variable into a custom control property
Is it possible to pass in a global javascript variable into a custom control property?? I have been messing with this all day and cannot.
Something to this effect:
var jscriptvar = test;
<PGE:IsAdmin runat="server" Title="'+jscriptvar+'"/>
Or could I even pass in another custom control?
<PGE:IsAdmin runat="server" Title="<SP:Title runat="server" />" />
Something to this effect:
var jscriptvar = test;
<PGE:IsAdmin runat="server" Title="'+jscriptvar+'"/>
Or could I even pass in another custom control?
<PGE:IsAdmin runat="server" Title="<SP:Title runat="server" />" />
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
If you use the Page.RegisterHiddenField function the field will not be prepended with a clientid. It makes it easier to use it in Javascript.
ASKER
Thanks, I will give these a shot.
I am using SharePoint and modifying one of the aspx pages with some javascript. I am inserting my own custom control tag onto the page and then trying to pass in the javascript to the variable. I will let you all know how it goes.
thanks
jordan
I am using SharePoint and modifying one of the aspx pages with some javascript. I am inserting my own custom control tag onto the page and then trying to pass in the javascript to the variable. I will let you all know how it goes.
thanks
jordan
<PGE:IsAdmin runat="server" Title="'+<script language='javascript' type='text/javascript'>doc