A
Ana Rita
Hello to all.
I'm trying to do call a vbscript sub in one page aspx.
My vbscript sub is in a file with the extension (vbs) and
it looks like this:
Sub Mens (strmens)
Msgbox strmens
End sub
In the aspx page I do this in page_load:
Button1.Attributes.Add("onclick", "vbscript:Mens'" &
Hello & "''")
When I click in Button1 it shows the message.
My problem begins when I call the function in the
Button1_Click (aspx)
I do something like this:
Dim Message as string
Message="Hello"
Dim str as new stringBuilder
str.Append("<script language='vbscript'>")
str.Append("Mens ' "& Message &" ' ")
str.Append("</script>")
RegisterStartupScript("FichaAptidao.aspx", str.ToString)
When I click in Button1 it gives me this error message:
"Microsoft VBScript runtime error: Wrong number of
arguments or invalid property assignment: Mens"
I can understand why it gives me this error.
Can anyone help me?
Thank you all.
Ana Rita
I'm trying to do call a vbscript sub in one page aspx.
My vbscript sub is in a file with the extension (vbs) and
it looks like this:
Sub Mens (strmens)
Msgbox strmens
End sub
In the aspx page I do this in page_load:
Button1.Attributes.Add("onclick", "vbscript:Mens'" &
Hello & "''")
When I click in Button1 it shows the message.
My problem begins when I call the function in the
Button1_Click (aspx)
I do something like this:
Dim Message as string
Message="Hello"
Dim str as new stringBuilder
str.Append("<script language='vbscript'>")
str.Append("Mens ' "& Message &" ' ")
str.Append("</script>")
RegisterStartupScript("FichaAptidao.aspx", str.ToString)
When I click in Button1 it gives me this error message:
"Microsoft VBScript runtime error: Wrong number of
arguments or invalid property assignment: Mens"
I can understand why it gives me this error.
Can anyone help me?
Thank you all.
Ana Rita