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

Server Button in Grid View with 2 parameters

mik
I've a grid view with a Server Button, I know how to send a single
value of the row, but How Can I manage 2 parameters (of the row)??

</asp:BoundField>
<asp:TemplateField HeaderText="Scadute">
<ItemTemplate>

<asp:Button ID="btnOggi" runat="Server" CommandArgument='<%#
Eval("ID") %>' OnClick="gwDettaglio_Click" Text='<%# Eval("ID") %>'
Width="60px" />
....
protected void gwDettaglio_Click(object sender, EventArgs e)
{
string IDAttivitaTipo;
IDAttivitaTipo =
Convert.ToString(((Button)sender).CommandArgument) ;


How Can I manage 2 differents variables in my code behind page?
Thanks
Jun 27 '08 #1
2 1100
"mik" <mi*@nomail.itwrote in message
news:uo**************@TK2MSFTNGP04.phx.gbl...
How Can I manage 2 differents variables in my code behind page?
<asp:Button ID="btnOggi" runat="server" CommandName='<%# Eval("Whatever")%>'
CommandArgument='<%# Eval("ID") %>' OnCommand="gwDettaglio_Command"
Text='<%# Eval("ID") %>' Width="60px" />

protected void gwDettaglio_Command(object sender, CommandEventArgs e)
{
Whatever = e.CommandName;
IDAttivitaTipo = e.CommandArgument;
}
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #2
mik
protected void gwDettaglio_Command(object sender, CommandEventArgs e)
{
Whatever = e.CommandName;
IDAttivitaTipo = e.CommandArgument;
}

Greeeeat!! Thanks for help me!!!!
Jun 27 '08 #3

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

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
3
by: MBW | last post by:
The following code is for a simple server/client asplication that allows the user to toggle between serve and or client modes and send/recieve a message however i am getting an Attribute error on...
4
by: Peter Bailey | last post by:
I have a vba string taht dynamically creates the query which has two dates in it that it grabs off an open form as a string from the textbox. What I generate in vba is: SELECT DOSMBK.Date,...
6
by: fumanchu | last post by:
I've got to let end users (really just one person) load billing batch files into a third party app table. They need to specify the billing cycle name, the batch name, and the input file name and...
4
by: John Boy | last post by:
Hi, Can anyone help. This is really doing my nut in. 3 years ASP exp. and now doing .DOT which is a step in the wrong direction. Basically I am left with the code of a guy who has left. When I...
6
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called...
5
by: =?Utf-8?B?QW1pciBUb2hpZGk=?= | last post by:
Hi I have a search page which display a grid of master records. Those records that have children have a hyperlink that takes the user to the Details page for that record. How can I implement...
2
by: rameshgohil | last post by:
I am using grid view and a button column in it using <itemTemplate> but I am not able to rerive cell value of a selected row from grid view. I have tried the following to methods in Row_command...
1
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: 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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.