1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

SQL on ASP.net

Discussion in 'C#' started by flaviorodrigues, Feb 13, 2008.

  1. #1
    Hi, i like to do any like that:

    I have one label called lbltesting and i like to do a select count to table "news" that is in database master and put on that labem the total of notices.

    Lbltesting.text = "select count .....
    Anyone can help me to do that? put some examples or any like that!

    Another question, i have a table called configs, then i use just one line with any like that:

    Cod | Sitename | slogan | adminmails |
    1 | Testing | testing all | abs@asd.com |

    and this table just have 1 line, so i like to in page load call this table and use any like that:

    Application("titulo") = "sitename" (that its on database)

    And then i like to know how can i do a page with a textbox and a button and then user click on button and this edit this line on databae and put the textbox content.

    Please help me, its urgent to a school project

    Best Regards
    flaviorodrigues, Feb 13, 2008 IP
  2. jimrthy

    jimrthy Guest

    Likes Received:
    Best Answers:
    Trophy Points:
    Take a look at datasets and data binding. While you're at it, take a look at SqlDataSource. There are *tons* of different ways to do this. Without knowing where you are in the class, it's hard to know how you're actually supposed to handle this.
    jimrthy, Feb 20, 2008 IP
  3. Forrest

    Forrest Peon

    Likes Received:
    Best Answers:
    Trophy Points:
    You can do it declaratively, like jimrthy suggested, or use ADO.NET directly from your code with the SqlClient namespace. I'd do the latter for scalability.
    Forrest, Feb 25, 2008 IP