I am new to ASP.NET. I am converting a fairly good sized app from classic
to .net. Some of my pages have a lot of controls and javascript functions.
I would like to keep these intact as much as possible. I have put my
javascript
in a seperate file and I am trying to include it using
RegisterClientScriptInclude.
Note, so far I have only been adding files to my web site, I have not
created a 'Project' or web resources or assemblies.
Actually, none of the three methods of inserting code below are working.
What am I missing?
<%@ Page Language="VB" MasterPageFile="Main.master"
AutoEventWireup="false"
title="Login" %>
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs)
Dim scriptText As String
scriptText = "return confirm('Do you want to submit the page?')"
ClientScript.RegisterOnSubmitStatement(Me.GetType( ), _
"ConfirmSubmit", scriptText)
Dim myScript As String = "alert(document.forms[0]['usercode'].value);"
Page.ClientScript.RegisterStartupScript(Me.GetType (), "myKey",
myScript, True)
Page.ClientScript.RegisterClientScriptInclude(Me.G etType(),
"LoginJS", "Login.js")
End Sub
</script>
TIA
--
Tom