473,387 Members | 1,512 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,387 software developers and data experts.

server side or client side buttton

Hello again!!

my understanding of the principles of this stuff are a bit vague so i
apologise in advance - sort of thrown in at the deep end. Anyway - I
am working on a project at the minute and i have created a button
using the following code.

<asp:button id="Button1" onclick="upload" runat="server" Width="119px"
text="Upload"></asp:button>

this button calls and runs some code ie. sub upload - see below

Public Sub upload(ByVal s As Object, ByVal e As EventArgs)

i have created my own button in fireworks and want to insert it in my
code an call this function but it does not work - code below
<INPUT id="btn_EditImage" type="image" src="Buttons/EditImage.gif"
onclick="upload" runat="server"></TD>.

i can change my button to a server control and call the function from
there but there is an issue with the arguments in the code. any ideas
appreciated .

CG
Nov 19 '05 #1
3 931
cs********@hotmail.com (Colin Graham) wrote in
news:ee*************************@posting.google.co m:
i have created my own button in fireworks and want to insert it in my
code an call this function but it does not work - code below
<INPUT id="btn_EditImage" type="image" src="Buttons/EditImage.gif"
onclick="upload" runat="server"></TD>.
The onClick method is for Javascript functions - not server side functions.

Since you're using fireworks for your button (it's a graphic right?) use an
imageButton instead of a regular .NET button. That'll allow you to bind the
button to .NET functions.

i can change my button to a server control and call the function from
there but there is an issue with the arguments in the code. any ideas
appreciated .


--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
thanks lucas ive tried that and the button works fine unfortunately i
now get the following error

Parser Error Message: The base class includes the field 'button1', but
its type (System.Web.UI.WebControls.Button) is not compatible with the
type of control (System.Web.UI.WebControls.ImageButton).

does this mean i have to change my asp.net function??

any help appreciated

CG
Nov 19 '05 #3
cs********@hotmail.com (Colin Graham) wrote in
news:ee**************************@posting.google.c om:
thanks lucas ive tried that and the button works fine unfortunately i
now get the following error

Parser Error Message: The base class includes the field 'button1', but
its type (System.Web.UI.WebControls.Button) is not compatible with the
type of control (System.Web.UI.WebControls.ImageButton).

does this mean i have to change my asp.net function??

Check your codebehind... is button1 still declared as a
System.Web.UI.WebControls.Button not as a
System.Web.UI.WebControls.ImageButton? Make sure button one is declared as
a ImageButton.

Take a look at the "hidden" code VS.NET auto generates. Sometimes it
doesn't update the code properly.
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #4

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

Similar topics

4
by: Marcel Brekelmans | last post by:
Hi, This is my situation: My ISP doesn't allow me the execute server-code. So, no ASP or otherwise.As a small compensation, they run some CGI scripts that we can use. With one of these...
1
by: yaya coco | last post by:
I want to use button. My question is that How can use server side and client site event at the same time. That is: I want to use button : when The user click the button first of all, client...
0
by: Anthony W DiGrigoli | last post by:
I have two ASP.NET Server Side buttons that perform action on both the Server and Client side. Here is the break down of code placement: 1. Server-Side Load: Contains an Add Attribute for a...
2
by: Eitan | last post by:
Helo, I need to link the aspx page to a general vbscript (run on the server side). The code has the line : <%@ page language="vb" autowventWireUp="false" codeBehind="myasp.aspx.vb" inherits...
1
by: jkhome | last post by:
I have a page which has a block of form elements. If i was writing the page in normal asp and javascript it would be easy for me to dynamically write client side script which dynamically adds and...
0
by: brianpmccullough | last post by:
Hello, Anyone ever implemented a solution that allows you to track the total page request time in and ASP.NET page? The time would need to include the server processing time and client side...
0
by: pradeepjaladi | last post by:
Hi All, I required a simple example, which can uploades the file from client side and server side code which saves in the destination folder.
1
idsanjeev
by: idsanjeev | last post by:
Hello What is server and client side code. where can use server side code and where client side Thanks
3
by: malathib | last post by:
Hi, In my web application, in one of the screen when the user clicks on one link, it has to open a folder that was located in server in client side.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...

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.