whats wrong with this

samo_bs

New Member
I am new to .net, please let me know the problem in this.<BR>i am executing the below code by saving it as aspplus.aspx and executing on win2k and iis5.0 but i am not getting any output , though am not getting any errors.what might be the cause.<BR>/******************************************<BR><%@ Page Language="VB" %><BR><script language="VB" runat="server"><BR>response.write("Hello World")<BR></script><BR>/******************************************instead of doing a response.write, look into putting a label on the web page and then displaying something in the text property of the label. For example:<BR><BR><script language=vb runat=server><BR>Sub page_load()<BR>mylabel.text = "Hello World"<BR>end sub<BR></script><BR><BR><asp:label name=mylabel runat=server/><BR><BR>Hope this helpsYou can also use a <span> tag if you wish to add things like styles easily. The code might look like this:<BR><BR>Sub Page_Load(Sender As Object, E As EventArgs)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lblTest.InnerHtml = "Hello, world!"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lblTest.Style("color") = "blue"<BR>End Sub<BR><BR><span id="lblTest" runat="server"/>Both good ideas, but why doesn&#039t response.write work?Because it isn&#039t in a Sub. I wouldn&#039t use Response.Write, (why bother?), but if you really must, here&#039s one way to do it:<BR><BR><script language="VB" runat="server"><BR>??????Sub Page_Load(Sender As Object, E As EventArgs)<BR>?????????Response.Write("test")<BR>??????End Sub<BR></script>
 
Top