473,796 Members | 2,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1242
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*****@iastat e.edu> wrote in message
news:eZ******** ******@TK2MSFTN GP15.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.co m> wrote in message
news:OX******** ********@tk2msf tngp13.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*****@iastat e.edu> wrote in message
news:eZ******** ******@TK2MSFTN GP15.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*****@iastat e.edu> wrote in message
news:en******** *****@TK2MSFTNG P15.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.co m> wrote in message
news:OX******** ********@tk2msf tngp13.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*****@iastat e.edu> wrote in message
news:eZ******** ******@TK2MSFTN GP15.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.goo glegroups.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
2431
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 a property on the client? Here is code, albeit changed to show both paths I have tried to follow, neither of which works. I also can't seem to find out how to trap for the errors so I can see what's going wrong. <%@ Language=VBScript %>
12
9803
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 ---------------------------------------------------------------------------- -------------------------------------------- Here's how the site works: You should press a button in the rollover area in order to load a source file on an Iframe, this Iframe is actually hidden working as a Buffer. The body of this loaded Iframe is...
4
3433
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 write and it works fine until she puts it into a function and then calls the function from a button with onClick. This also seems to work OK, with the exception that the page is cleared, and the curser changes (and stays) as an hourglass. In...
5
5906
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 button to open the "file browse" dialog and the Submit button to submit the form data.
6
2066
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
4973
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 for things like delete, save, edit, cancel buttons - in the footer, or on the form detail section? 2. If in the footer, how do you add them to the tab order?
9
2781
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 IS IMPOSSIBLE TO PROGRAMMATICALLY ADD A BUTTON TO A DYNAMICALLY CREATED PAGE. Or, to be more precise, why it is impossible to have an onClick sub respond to that button’s Click event. My main page has only one line:
8
23235
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 our application that will do the exact same thing as the Back button in the browser. Can anyone give me any suggestions on how to do this using VB .Net? I have Googled for "Create Back Button" and found stuff in JavaScript and HTML but nothing in...
18
2628
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 am attempting to write an application as I learn. It's been going fine but I've ran into a problem which is driving me crazy. I'll start off by explaining what I'm trying to achieve... I'm simply trying to insert an input button into a table at a...
0
9527
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10453
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10172
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.