Creating ASP.Net site without using VB classes

Results 1 to 2 of 2

Thread: Creating ASP.Net site without using VB classes

  1. #1
    Join Date
    Dec 1969

    Default Creating ASP.Net site without using VB classes

    I am new to programming. I was going through the code of microsoft sample sites. The code for simple log in was so long and it had VB classes as well in it. Do you think that a site can be created without using VB classes. I am not too good in VB programming but I have been doing programing in ASP for almost 3 years.<BR><BR>I am creating a site for simple registration of members and editing member profile etc. Please suggest if I can accomplish this without using VB classes.<BR><BR>Please reply me urgently as I want to start my work straight way.<BR><BR>Thanks a lot.<BR>

  2. #2
    Join Date
    Dec 1969

    Default Sure

    you can write script only pages in ASP.NET just like you did with classic ASP. Here&#039;s a C# syntax sample. VB.NET is capable of doing it in this way as well. Just import the namespaces you need at the top of the page. this sample imports the System.Data classes needed for interaction with SQL Server.<BR><BR>&#060;%@ Import Namespace="System.Data" %&#062;<BR>&#060;%@ Import Namespace="System.Data.SqlClient" %&#062;<BR>&#060;script Language="C#" runat="server"&#062;<BR> <BR> protected void Page_Load(object sender, EventArgs e) { ProcessPage(); }<BR> <BR> public void ProcessPage()<BR>{<BR> Response.Write("Hello World");<BR>}<BR><BR>public void WriteHelloWorld()<BR>{<BR> Response.Write("Another Hello");<BR>}<BR><BR>&#060;/script&#062;<BR><BR>&#060;HTML&#062;&#060;BODY&#06 2;<BR>&#060;% WriteHelloWorld(); %&#062;<BR>&#060;/BODY&#062;&#060;/HTML&#062;<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts