Guys,
I was wondering if you can help its concerning an ASP 2.0 page I'm trying to write.
I'm no ASP expert (infact this is the first one I've ever written), so the question I pose here may seem pretty simple, but please put up with me.
The code so far is as follows:
<html>
<body>
<form action="helloworld.asp" method="post">
Server to check:<input type="text" name="Server" size="20" />
<input type="submit" value="Check my server" />
</form>
<%
Dim Server
'Create server heading
Server=Request.Form("Server")
If Server<>""Then
Response.Write("<b><font size=14>System Check: </b></font>""<b><font size=14>" &(Ucase(Server))&"</b></font>" &"<br>")
End If
Response.Write("" & "<br>")
Response.Write("" & "<br>")
Response.Write("" & "<br>")
Response.Write("" & "<br>")
Response.Write("<b>GENERAL SYSTEM INFORMATION</b>" & "<br>")
Response.Write("-------------------------------------------" & "<br>")
ObjFile.WriteLine "GENERAL SYSTEM INFORMATION"
ObjFile.WriteLine "============================"
%>
</body>
</html>
When I load up my webpage, all my VB code runs at the time the page loads, which is not the desired effect I want. As you can see I have a button called 'Check my server' and an input box called 'Server'.
I only want the code to run, AFTER the input box has been filled out and the 'Check my server' button is pressed.
I guess I'll need some kind of onclick event for the button and also to seperate the vb code and something else as well, but I'm not sure what.
So, if any of you clever guys can point me in the right direction, I would be most grateful.
I was wondering if you can help its concerning an ASP 2.0 page I'm trying to write.
I'm no ASP expert (infact this is the first one I've ever written), so the question I pose here may seem pretty simple, but please put up with me.
The code so far is as follows:
<html>
<body>
<form action="helloworld.asp" method="post">
Server to check:<input type="text" name="Server" size="20" />
<input type="submit" value="Check my server" />
</form>
<%
Dim Server
'Create server heading
Server=Request.Form("Server")
If Server<>""Then
Response.Write("<b><font size=14>System Check: </b></font>""<b><font size=14>" &(Ucase(Server))&"</b></font>" &"<br>")
End If
Response.Write("" & "<br>")
Response.Write("" & "<br>")
Response.Write("" & "<br>")
Response.Write("" & "<br>")
Response.Write("<b>GENERAL SYSTEM INFORMATION</b>" & "<br>")
Response.Write("-------------------------------------------" & "<br>")
ObjFile.WriteLine "GENERAL SYSTEM INFORMATION"
ObjFile.WriteLine "============================"
%>
</body>
</html>
When I load up my webpage, all my VB code runs at the time the page loads, which is not the desired effect I want. As you can see I have a button called 'Check my server' and an input box called 'Server'.
I only want the code to run, AFTER the input box has been filled out and the 'Check my server' button is pressed.
I guess I'll need some kind of onclick event for the button and also to seperate the vb code and something else as well, but I'm not sure what.
So, if any of you clever guys can point me in the right direction, I would be most grateful.