A
antonyliu2002
Hi, gurus:
For VB.NET, if I have a variable myString somewhere inside <% and %>
in a page called mypage.aspx like so:
<%
'.... some code here
myString = "Junkie.txt"
'.... some other code here
%>
My client side code will use 'myString' like this:
<param name="fileName" value="<%= myString %>">
Now can I also have a function in the same page and have the function
use myString? In other words, can I have something like below in
mypage.aspx?
Sub mySub()
lblMessage.Text = myString
End Sub
Assuming that lblMessage is a Label control declared in mypage.aspx.
When I was trying to do this, the compiler says that 'myString' is not
declared.
Did I make the idea clear? How to implement it? Thanks.
For VB.NET, if I have a variable myString somewhere inside <% and %>
in a page called mypage.aspx like so:
<%
'.... some code here
myString = "Junkie.txt"
'.... some other code here
%>
My client side code will use 'myString' like this:
<param name="fileName" value="<%= myString %>">
Now can I also have a function in the same page and have the function
use myString? In other words, can I have something like below in
mypage.aspx?
Sub mySub()
lblMessage.Text = myString
End Sub
Assuming that lblMessage is a Label control declared in mypage.aspx.
When I was trying to do this, the compiler says that 'myString' is not
declared.
Did I make the idea clear? How to implement it? Thanks.