Writing a website using VB.NET-back-end, without ASP.NET

I was asked to create a website with VB.NET server side code, and I cannot use ASP.NET or any client scripts. Pages must interact with a Microsoft SQL Server database hosted on a Windows 2003 server (on which IIS and the .NET Framework are installed). I was an example for Google, but everything seems to me like ASP.

I have a basic experience with PHP and I can program in VB.NET, but I have never had to do anything like this before. Can someone give me a link or a basic example that I could play with this will help me link the html page to the SQL database with VB.NET as my server code without using ASP.NET?

Editing and clarification: I know ASP.NET is server-side — something that I specifically forbade using is any tag starting with <asp: or containing runat=server . If there are other ASP.NET features that I can / should use, then this is great.

+4
source share
4 answers

In particular, they told me that I cannot use tags starting with "<asp:" or containing "runat = server"

You can at least use IIS and .NET tools in IIS, right? Are you not completely reprogramming the web server?

Just create a handler (* .ashx) and use Response.Write() , <%= and <%: for all.

You should also see if you can use ASP.Net MVC (server controls are not needed at all). Otherwise, you are essentially back in the dark days of classic asp.

+2
source

ASP.NET is not client-side.

ASP.NET is a web development framework that uses a server-side language such as C # / Vb.NET. So, what you are going to create is an ASP.NET application with VB.NET as the language of your code.

If you still do not want to use the ASP.NET web form framework to create a website, but still want to use Vb.NET as a language, you might consider creating a WCF service using VB.NET and letting your client not use, asp.net web application consumes it.

EDIT: After viewing a comment

I was specifically forbidden to use any tag starting

Consider ASP.NET MVC. There are no server controls, for example, you have in webforms with runat=server . You will write PURE HTML code and attach to some data as needed.

+1
source

Well, I suppose you could write a web server in VB.net that does not use ASP.net, but why?

Given that you did not have a specific restriction on the use of MVC, I would look at that.

0
source

You do not have to use controls to create a website using ASP.NET. Use simple HTML and your server side code just prints the text. Something like that:

 <table> <%= tableRow.toString() %> </table> 

You will use many string constructs, but it should do what you are looking for.

MVC may be another alternative if you can convince them that it is not actually doing any client-side code. You separate the HTML representation (and any javascript, if they allow you to use it) from the business logic and the database.

Hope this helps.

0
source

Source: https://habr.com/ru/post/1435065/


All Articles