How to connect a HTML Page to Sql server?

Last post 05-17-2008 6:22 AM by aresssrinivas. 5 replies.

Sort Posts:

  • How to connect a HTML Page to Sql server?

    05-17-2008, 4:17 AM
    • Loading...
    • vik1987
    • Joined on 08-25-2007, 10:31 AM
    • Posts 57

    Hi 

     How can I connect an HTML Page to Sql server?

     What could be the best way for it?

     

    Thanks

    Vikash 

  • Re: How to connect a HTML Page to Sql server?

    05-17-2008, 5:08 AM

    Turn the .html page into a aspx page, or configure your IIS to treat .html pages as if they were .aspx files, so they are processed by ASP.NET:

    IIS -> select the web site -> Properties -> Home Directory -> Configuration -> Mappings

    Actually, there is probably an awful lot more to it than that, so just re-doing the pages as .aspx is probably going to be easier. 

     

    Regards Mike
    [MVP - ASP/ASP.NET]
  • Re: How to connect a HTML Page to Sql server?

    05-17-2008, 5:28 AM
    • Loading...
    • vik1987
    • Joined on 08-25-2007, 10:31 AM
    • Posts 57

    Thanks  Mikesdotnetting

     But I have the need of this functionality in only 4-5 pages.

    So I am not able to change the complete project so please suggest me any other alternative or should I use the VB Script?

     

    Thanks

     

     

  • Re: How to connect a HTML Page to Sql server?

    05-17-2008, 5:36 AM
    Answer

    Yes, you could use (server-side) VBScript, but then you would have to map the .html files to asp.dll, so they are treated by IIS as classic asp pages.  I'm afraid .html files are not capable on their own of any server-side processing.  That means you only have the two choices I outlined above: change the .html files to server-side files, or fool IIS into thinking they are.

     

    Regards Mike
    [MVP - ASP/ASP.NET]
  • Re: How to connect a HTML Page to Sql server?

    05-17-2008, 5:51 AM
    • Loading...
    • vik1987
    • Joined on 08-25-2007, 10:31 AM
    • Posts 57

     Ok. I am using these HTML page in my vb 2005 Project.

     Thanks


     

  • Re: How to connect a HTML Page to Sql server?

    05-17-2008, 6:22 AM
    Answer

    Hi viki,

            You need to use server side language to access your database.... Html pages are client side that executes on the client side. You will need to convvert your html pages to asp.net to connect to your server..

     

    Hope this helps U....
     

Page 1 of 1 (6 items)