473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

button on HTML page that calls code

I have many html pages that I need to put a button on. When this button is
clicked I need to call a stored procedure that updates a record.

-How do I add a button to html page that will call a .vbs or .js file (if
that what I should even call, I would rather call a .vb class I have created
but don't know if that is possible)?

Thanks for the help, hopefully this is enough to go off of. I just need to
get pointed in the right direction.

Andy
Nov 19 '05 #1
5 1211
Andy,

Database access is a server-side task. On server side you can make either a
web application or a webservice. In the former case you will need to turn
your html pages into aspx pages. In the latter case you will need to get
your html pages to call the webservice that you will have to implement. Your
..vb class will be a part of either your web application or your webservice.

Eliyahu

"Andy G" <aj*****@iastate.edu> wrote in message
news:eZ**************@TK2MSFTNGP15.phx.gbl...
I have many html pages that I need to put a button on. When this button is clicked I need to call a stored procedure that updates a record.

-How do I add a button to html page that will call a .vbs or .js file (if
that what I should even call, I would rather call a .vb class I have created but don't know if that is possible)?

Thanks for the help, hopefully this is enough to go off of. I just need to get pointed in the right direction.

Andy

Nov 19 '05 #2
These html pages reside inside an already developed ASP.NET web application.
I'm sure there is a way I can put a button on a html page without turning it
into a .aspx page and get it to call a script or class file.

Any ideas?

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:OX****************@tk2msftngp13.phx.gbl...
Andy,

Database access is a server-side task. On server side you can make either
a
web application or a webservice. In the former case you will need to turn
your html pages into aspx pages. In the latter case you will need to get
your html pages to call the webservice that you will have to implement.
Your
.vb class will be a part of either your web application or your
webservice.

Eliyahu

"Andy G" <aj*****@iastate.edu> wrote in message
news:eZ**************@TK2MSFTNGP15.phx.gbl...
I have many html pages that I need to put a button on. When this button

is
clicked I need to call a stored procedure that updates a record.

-How do I add a button to html page that will call a .vbs or .js file (if
that what I should even call, I would rather call a .vb class I have

created
but don't know if that is possible)?

Thanks for the help, hopefully this is enough to go off of. I just need

to
get pointed in the right direction.

Andy


Nov 19 '05 #3
No, there is no such a way. Since you want an html button to invoke a server
action, you essentially want to turn it into a server control. You do it by
adding runat=server. Server controls can live only on aspx pages.

Eliyahu

"Andy G" <aj*****@iastate.edu> wrote in message
news:en*************@TK2MSFTNGP15.phx.gbl...
These html pages reside inside an already developed ASP.NET web application. I'm sure there is a way I can put a button on a html page without turning it into a .aspx page and get it to call a script or class file.

Any ideas?

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:OX****************@tk2msftngp13.phx.gbl...
Andy,

Database access is a server-side task. On server side you can make either a
web application or a webservice. In the former case you will need to turn your html pages into aspx pages. In the latter case you will need to get
your html pages to call the webservice that you will have to implement.
Your
.vb class will be a part of either your web application or your
webservice.

Eliyahu

"Andy G" <aj*****@iastate.edu> wrote in message
news:eZ**************@TK2MSFTNGP15.phx.gbl...
I have many html pages that I need to put a button on. When this button
is
clicked I need to call a stored procedure that updates a record.

-How do I add a button to html page that will call a .vbs or .js file
(if that what I should even call, I would rather call a .vb class I have

created
but don't know if that is possible)?

Thanks for the help, hopefully this is enough to go off of. I just

need to
get pointed in the right direction.

Andy



Nov 19 '05 #4

Eliyahu Goldin wrote:
No, there is no such a way. Since you want an html button to invoke a server action, you essentially want to turn it into a server control. You do it by adding runat=server. Server controls can live only on aspx pages.

Eliyahu


Couldn't you do some sort of a submit to a CGI program on the server,
that CGI code would be written in a .NET language and hence use
SqlCommand to invoke the stored procedure? Does IIS support CGI? Can
a CGI program be written in .NET?

-Steve

Nov 19 '05 #5
Steve,

Since, I started programming for web straight with asp.net, I have a very
little idea about CGI. Post this in a separate thread with an appropriate
subject.

Eliyahu

"Steve Richter" <St************@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...

Eliyahu Goldin wrote:
No, there is no such a way. Since you want an html button to invoke a

server
action, you essentially want to turn it into a server control. You do

it by
adding runat=server. Server controls can live only on aspx pages.

Eliyahu


Couldn't you do some sort of a submit to a CGI program on the server,
that CGI code would be written in a .NET language and hence use
SqlCommand to invoke the stored procedure? Does IIS support CGI? Can
a CGI program be written in .NET?

-Steve

Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Fred | last post by:
I have read and tried every combination for hours. I'm sorry, but I don't get it. How do I have a form with textboxes and buttons and allow click events to execute a server function then display...
12
by: Javier | last post by:
Hello, I'm very new in this forum and as I have the following problem, the website is in http://new.vanara.com ----------------------------------------------------------------------------...
4
by: frogman042 | last post by:
My daughter is playing around trying to learn JavaScript and she wrote a small program that prints out a message in increasing and decreasing font size and color changes. She is using document...
5
by: Codeman II | last post by:
Hi there, I am building a form where the user must upload a picture and fill in his details. Now I have a problem as all of this is on the same form. How will I be able to have the Browse...
6
by: MW de Jager | last post by:
I'm trying to create an html page that will change dynamically. I need to switch html -buttons between visible and invisible. Is there any way I can do this with a script? Regards MW
14
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons...
9
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT...
8
by: Coleen | last post by:
Yes, I know why would I want to create a back button when there is one on the browser? Because that's what the users want! they want a "Previous" button that they can click from any web page in...
18
by: bning | last post by:
Hmm this forum really doesn't give you long enough to type in your question before logging you out.. well here goes my second attempt: I'm trying to teach myself javascript with dom scripting and...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.