Call asp function from .vb file?

evanheld

Newcomer
Joined
Nov 20, 2003
Messages
13
Location
Sarasota, FL
Hello,

I need to call one of my javascript functions in the html file from the code behind .vb file. It's not on a button click, so using the following code:

btnPSS.Attributes.Add("onClick", "popup('PSS.aspx')")

does not fit my need. I need to call this popup() function when a user selects a certain item in a drop down box.

I know there is a simple function call to do this but I can't think of the name!! :mad:

Any help would be appreciated!
 
I used:
Page.RegisterStartupScript

example:
Dim sScript = "<script language=javascript>"
' sScript += "window.open('ESolution.aspx', null, '');"
sScript += "window.close('ViewProbSol.aspx');"
sScript += "</script>"
Page.RegisterStartupScript("blah", sScript)
 
Page.RegisterStartupScript("Blah", "<script language=javascript>popup('FormsFSA.aspx');</script>")

I tried to implement this in my .vb file and it complains that an object is expected and hightlights this:

popup('FormsFSA.aspx');
 
that doesnt look right, i think.

I have a linkbutton, in the sub of that link button, i have that code. When u click the linkbutton, the page pops up.
 
Back
Top