Newbie question... Executing code when a button is clicked...

Discussion in 'ASP General' started by Brad Pears, Oct 1, 2004.

  1. Brad Pears

    Brad Pears Guest

    Hello there.. I am completely new to ASP and web programming but I do
    program in Acces and VB so know how to program...

    There is a small project involving ASP going on here that I somehow got
    dragged into. SInce I do not know anything abotu it, I downloaded a product
    called ASPRunner which allows you to connect to a DB of choice using an ODBC
    connection and it automatically generates a series of ASP pages which you
    can then run. We have a test web site set up on our IIS server to play
    around with.

    SO, this worked good, but now I want to make some changes like provide data
    editing and be able to add/modify buttons and the code behind them.

    We do not have an ASP product like ASP.net isntalled here and as such have
    used Visual Studio .NET to open one of the ASP pages that were generated by
    ASPRunner.

    Since there is no "form" per se - as compared to what I am used to (it's all
    text in the ASP page) , where do I place code that I want to run when a
    user clicks a button or enters data in a particular field?

    For instance, as a test, I located a line defining buttons in one particular
    ASP page. I then duplicated that line and changed some things and when I ran
    the project - low and behold, there was my new button.

    Now my question is, I want to have something happen when that button is
    clicked - something real simple - like display the user a message that
    "button was clicked".

    Here is a button definition line I added...

    input class=button type=button value="Test" ID="Test1" NAME="Test1"

    How do I reference this in the code somewhere so that when it is clicked,
    the code to display a message will run? Can someone give me some sample
    code and point out how it all works?


    Thanks,

    Brad
     
    Brad Pears, Oct 1, 2004
    #1
    1. Advertising

  2. http://www.aspfaq.com/5003

    Ray at work

    "Brad Pears" <> wrote in message
    news:%23TdZyq$...
    > Hello there.. I am completely new to ASP and web programming but I do
    > program in Acces and VB so know how to program...
     
    Ray Costanzo [MVP], Oct 1, 2004
    #2
    1. Advertising

  3. Brad Pears

    Brad Pears Guest

    Ray, sorry if I did something wrong. You asked me to start a new thread
    right? Well, that's what I thought I did.. I'm pretty sure I only posted to
    this site. Did I accidentally post elsewhere as well? If I did I;m sorry...


    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:e5lYYy$...
    > http://www.aspfaq.com/5003
    >
    > Ray at work
    >
    > "Brad Pears" <> wrote in message
    > news:%23TdZyq$...
    > > Hello there.. I am completely new to ASP and web programming but I do
    > > program in Acces and VB so know how to program...

    >
    >
     
    Brad Pears, Oct 4, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mossman
    Replies:
    0
    Views:
    805
    Mossman
    Dec 12, 2005
  2. albert kao
    Replies:
    1
    Views:
    2,037
    marisa lee
    Apr 10, 2010
  3. bthumber
    Replies:
    4
    Views:
    487
    bthumber
    Jun 25, 2010
  4. Dave Prout

    Adding a second button if the first button is clicked

    Dave Prout, Jun 8, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    224
    John Saunders
    Jun 8, 2004
  5. Jim Mitchell
    Replies:
    0
    Views:
    213
    Jim Mitchell
    Jul 12, 2003
Loading...

Share This Page