Larry Brister
asked on
VB.NET Server side Javascript
I have a sub and on load I can get this to work...
ScriptManager.RegisterStar tupScript( Me, [GetType](), "alertMessage", "alert('LBRISTER');", True)
However....
I Cannot get this code to work...
What am I missing?
That string above works when assigned as an attribute in a RadGrid...
ScriptManager.RegisterStar
However....
I Cannot get this code to work...
What am I missing?
Dim url As String = "return window.radopen('EmployeeContact.aspx?MyLeads=1&ispop=1&IndividualID=1&CampaignID=0&OriginID=0&IsPopup=1','ViewContact');"
ScriptManager.RegisterStartupScript(Me, [GetType](), "script", url, True)
That string above works when assigned as an attribute in a RadGrid...
DirectCast(dataItem.FindControl("LinkName"), HyperLink).Attributes("onclick") = "return window.radopen('EmployeeContact.aspx?MyLeads=1&ispop=1&IndividualID=" & IndividualID & "&CampaignID=" & CampaignID & "&OriginID=" & OriginID & "&IsPopup=1" & "','ViewContact');"
Javascript has to be 'client-side' not server side.
ASKER
Then why does the alert work?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I Cannot get this code to work...need to know in what event, when and how you called that code...
Dim url As String = "return window.radopen('EmployeeContact.aspx?MyLeads=1&ispop=1&IndividualID=1&CampaignID=0&OriginID=0&IsPopup=1','ViewContact');"
ScriptManager.RegisterStartupScript(Me, [GetType](), "script", url, True)
how does this code get added to the page? Is it triggered by a user clicking on a button?
ASKER
Karen
It is created in the Page Load event
It is created in the Page Load event
ASKER
Sorry for the late get-back
Thanks
Thanks