Web Analytics Made Easy -
StatCounter Query data from MySQL using VB.net then update HTML element with this data. - CodingForum

Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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
    Welcome to the CodingForum!

    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

    Comment


    • #3
      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.

      Comment

      Working...
      X