473,804 Members | 3,330 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ImageButton CommandArgument

Hi,

I need to passing parameters in CommandArgument of the asp:ImageButton .
I don't use datagrid or datalist
Here is my code:

Private Sub ImageButtonComm andHandler( sender As Object, e As
CommandEventArg s )
Session("Id") = e.CommandArgume nt
end sub

<asp:ImageButto n CommandName="ed it" CommandArgument ='<%#
objReader("Rapp elID") %>' ID="cmdEdit" AlternateText=" Modifier/Edit"
ImageUrl="../images/edit.gif" runat="server"
onCommand="Imag eButtonCommandH andler" />

e.CommandArgume nt is always empty

Can you help me please?
Nov 18 '05 #1
1 4942
Your post went unanswered. Have you resolved this issue?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Gilles T." <gi************ @hotmail.com> wrote in message
news:Or******** **************@ news.easynews.c om...
Hi,

I need to passing parameters in CommandArgument of the asp:ImageButton .
I don't use datagrid or datalist
Here is my code:

Private Sub ImageButtonComm andHandler( sender As Object, e As
CommandEventArg s )
Session("Id") = e.CommandArgume nt
end sub

<asp:ImageButto n CommandName="ed it" CommandArgument ='<%#
objReader("Rapp elID") %>' ID="cmdEdit" AlternateText=" Modifier/Edit"
ImageUrl="../images/edit.gif" runat="server"
onCommand="Imag eButtonCommandH andler" />

e.CommandArgume nt is always empty

Can you help me please?

Nov 18 '05 #2

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

Similar topics

1
3299
by: Darren Clark | last post by:
I need to be able to send through 2 peices of infomraiton in the commandArgument property of a image button... <asp:imagebutton CommandArgument='<%# DataBinder.Eval(Container,"DataItem."+ JR.Core.Data.JobseekerData.FLD_SEARCH_ID) %>_<%# DataBinder.Eval(Container,"DataItem."+JR.Core.Data.JobseekerData.FLD_SEARCH_ PROFILE_ID ) %>' CommandName='ProfileMatch' id="match" onmouseover="this.src ='../Images/magnifyover.gif'"
2
3644
by: Chuck Hartman | last post by:
I've been trying to add an ImageButton object to a Calendar table cell, but so far I am unable to handle the Command event from that button in my form's code behind. Below is an example of what I am trying to do. The ImageButton that is on the form handles its Command event just fine, but the ImageButton that is added to the cell does not handle the event. Am I doing something wrong, or is not possible to add server controls to a calendar...
4
1874
by: angus | last post by:
Dear all, I know that i can add a button with oncommand event "ImageButton_Command" by using the asp:ImageButton tag in the aspx code. <asp:ImageButton id="imagebutton1" runat="server" AlternateText="Sort Ascending" ImageUrl="images/pict.jpg" OnCommand="ImageButton_Command" CommandName="Sort"
0
1515
by: Oddball | last post by:
I have set up a page with uses two lots of image buttons, one for a collection and one for more images from that collection. I generate all the image buttons on page init (I know, but I implemented that as part of trying to solve this already existant problem). The CollectionItemButton_Click event will fire, but the MoreImagesButton_Click will not. I just don't get it. Someone, somewhere told me that I have to reassociate event on...
1
1282
by: Shapper | last post by:
Hello, I have 2 Asp:ImageButton in my .aspx file and I have the function "Run" in m .aspx.vb file. I need to run this function when one of the ImageButtons is pressed but I need to know which one was pressed. How can I do this? I was trying with commandname and oncommand properties of ASP:ImageButton but I was not able to make this work.
5
2383
by: David Lozzi | last post by:
Howdy, New to .Net 2.0 and I'm about to go back to 1.1! So many little changes are driving me nuts. I have an ImageButton in a GridView template column. When clicking the image, it should send to another page with a specified query string. The images appear great. I have done the following scenarios, all with no results 1) Use OnClick of button specifying sub. Sub simply either response.redirect(page) or server.transfer(page,true) and...
1
2927
by: Cem | last post by:
Hi, in GridView1 I have following code: <ItemTemplate> <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%# Eval("airport_active", "images/icons/ico_airport_active_{0}.gif") %>' ToolTip="Aktivieren / Passivieren" OnClick="ImageButton1_Click" CommandArgument='<%# Bind("airport_ID") %>' /> <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("airport_ID")
4
2095
by: suzanne.boyle | last post by:
Hi, I'm adding an ImageButton as a child to a custom web control and attaching an event handler to it. When the page posts back the event is not being fired however. I initially assumed I had missed some code or something however after playing about I've found that if I change the control to a Button (or a LinkButton) the event fires. Here is the code called in the overridden CreateChildControls method. ImageButton btn = new...
0
1247
by: Adam Right | last post by:
Hi All, i am using CommandArgument of imagebutton in a Repeater for adding a item to shopping basket, like that; ************************** <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand"> <ItemTemplate> <asp:ImageButton ID="addToBasket" runat ="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"STOCK_CODE")%>'
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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
10075
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...
0
9143
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
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
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.