Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query data from MySQL using VB.net then update HTML element with this data.

    Hey there, I understand that you cannot query data from databases using JavaScript but you can with server-side languages. Well, we're using ASP.net as our server-side language.

    The problem I'm having is how to create/update an HTML element containing this MySQL data.

    I know how to change HTML elements using JavaScript so is there some way where you can 'connect' the data retrieved in VB.net to JavaScript so I can display it in an HTML element?

    I've googled, searched in forums but haven't found anything that worked. So, I'm hoping a direct question will answer this.

    Any links would suffice too.

  • #2
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,090
    Thanks
    2
    Thanked 23 Times in 23 Posts
    Welcome to the CodingForums!

    Your description of your problem is awfully vague. Please tell us specifically what you're trying to do. Only then can we help you.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  • #3
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey, thanks for the reply! Sorry it took so long for me to reply.

    First of all,

    1. We're using VB in ASP.net.
    2. The MySQL data we need to display are strings, numbers, dates and images.

    Well, what I mean is I'd like to display data from a MySQL table on a web page in an HTML element, let's say a paragraph tag, <p></p> inside a DIV.

    We're already able to display that MySQL data in a ASP label, textbox, textfields, etc, since it's easy to do so, you just have to write something like:

    Code:
    labelName.text = string
    Now, what we're having trouble doing is how to put that data in an HTML element not an ASP one.

    But I have another question before I start any new coding, just wanted to know advance if ASP labels, textboxes, textfields, etc must be fixed-length.

    If it does then it'll be ugly if we don't know the length of the MySQL data.

    And sorry for switching back between "I" and "we", I'm in my final year doing our final project in a team of 4.


  •  

    Tags for this Thread

    Posting Permissions

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