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

I have a datalist with a linkbutton listing outlet names. How do I get outletID?

In my ASP.net page, I have the datalist and this template:
<ItemTemplate>
<asp:ImageButton ID="btnButton" runat="server" OnClick="lnkBtnOutlet_Click" ImageUrl="/images/button.gif"
width="22" />
<asp:LinkButton ID="lnkBtnOutlet" runat="server" CssClass="style55"
Text='<%# Eval("outletName") %>' OnClick="lnkBtnOutlet_Click"></asp:LinkButton>
</ItemTemplate>

In C#, I have:
protected void lnkBtnOutlet_Click(object sender, EventArgs e)
{
try
{
LinkButton btn = sender as LinkButton;
TextBox1.Text = btn.Text;
Session["OUTLET_ID"] = ...;
Response.Redirect("Details.aspx?OutletID=" + ...);
}
catch { }
}

How do I get the equivalent outletID of the outletName? I know it's part of the data structure I load in my datalist, but how do I get it?
Dec 13 '10 #1
0 1149

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: shunah | last post by:
I'm building a form that lets users manage the app's lookup tables by adding and (maybe) removing values that show up in various combo boxes across the application. The original idea was to show...
2
by: News | last post by:
Hi, I need help with datalist and linkbutton. I need a LinkButton to display in datalist if datafield "is_measure_customchecklist" in a db table set to true. Here is the code (in parts): ...
10
by: Bharat | last post by:
Hi Folks, Suppose I have two link button on a page (say lnkBtn1 and lnkBtn2). On the click event of the lnkbtn1 I have to add a dynamically created control. And On the click event of the lnkBtn2 I...
1
by: Matt Mercer | last post by:
Hi, I want to use a datalist to display the contents of a database. I want to show the database field name and the content of the field for every record returned by the select statement. For...
1
by: AndrewR | last post by:
Hey all, Have a strange one here I don't understand.... I have a DataList control in an .aspx page. Inside the DataList's <ItemTemplate> is a single LinkButton control. On the initial page...
4
by: News | last post by:
Hi, I need help with datalist and linkbutton. I need a LinkButton to be visible in datalist only on the condition when datafield "is_measure_customchecklist" in a db table set to true. Here...
3
by: Mirek Endys | last post by:
I have DataList as part of DataList item. DataList in DataList. The parent DataList working well including Edit command, that shows Edit template and correctly bind the data into edit template...
1
by: gimme_this_gimme_that | last post by:
I'm developing an AJAX page that returns a list of names. When you click a bullet just to the left of a names another list of names appears with similar bullets. Each name is a hypertext link....
1
by: Brock | last post by:
Thanks in advance... (you can see a screenshot of what my form looks like currently at http://www.juggernautical.com/DataGrid.jpg - the Datalist is super-imposed in 'design view' but the DataGrid...
3
by: Crazy Cat | last post by:
Hi all, I am developing an asp.net 2.0 application in Visual Studio 2005. On my page I have a simple datalist that is bound programmatically to a collection of simple objects. On this page I...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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
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...
0
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...
0
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...
0
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,...

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.