JavaScript server side needed to connect & retrieve from SQL DB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ismailc
    New Member
    • Sep 2006
    • 200

    JavaScript server side needed to connect & retrieve from SQL DB

    Good day,

    Javscript server side needed to connect & retrieve from SQL DB.

    Can you please help by providing some code?

    I have an aspx page which I want to edit by adding information from a SQL database & display results on and in the html page.

    aspx page code
    Code:
    <%@ Control Language="c#" AutoEventWireup="True" Codebehind="Header.ascx.cs" Inherits="FlowCentric.Net.Navigator.Header" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
    <table>
    <tr> <td><asp:Label id="lblLogin" runat="server">Welc</asp:Label></td></tr>
    </table>
    Please Assist!
    Last edited by gits; Apr 7 '09, 02:59 PM. Reason: fixed code tags
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5388

    #2
    ??? could you explain a bit better what you need? you cannot connect directly to a database with javascript but you might do an XMLHttpRequest in the background that calls a serverside script and gives you the response back as json or text or whatever you want in your clientside script.

    kind regards

    Comment

    • ismailc
      New Member
      • Sep 2006
      • 200

      #3
      Hi, Thank You for the reply.

      It does not need to be javascript, i only have this aspx page (code above).
      I need to show information on this page which lies on the SQL db.

      Any code would be great that works in the aspx page where i can just insert the DB connection details & sql statement & display the result on page.


      Regards

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        If you're not after JavaScript, then you'll be better off asking in the ASP.NET forum.

        If it's JavaScript you want, try a simple Ajax request using one of the tutorial links from the Offsite Links thread (top of the forum list).

        Comment

        • ismailc
          New Member
          • Sep 2006
          • 200

          #5
          Apologies for the late reply & Thank You for the assistance.

          Will post in ASP pages.


          Regards

          Comment

          Working...