473,486 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

nested datalist and link button

40 New Member
how to open datalist containing multiple images on click on link button in selectedIndexChanged

Expand|Select|Wrap|Line Numbers
  1.   protected void SelectedIndexChanged(object sender, EventArgs e)
  2.     {
  3.  
  4.         dlEvntImages.Visible = true;
  5.         BLL_NewsAndEvents objNE = new BLL_NewsAndEvents();
  6.         objNE.title = dlEvents.DataKeys[dlEvents.SelectedIndex].ToString();
  7.         objNE.getImageDetails();
  8.         if (objNE.tests)
  9.         {
  10.             DataList dllEvntImages = (DataList)FindControl("dlEvntImages");
  11.  
  12.  
  13.  
  14.  
  15.             //Label lblMsg1 = (Label)FindControl("lblMsg");
  16.             Label lblMsg1 = (Label)dllEvntImages.FindControl("lblMsg");
  17.                 //(dlEvntImages.SelectedItem.FindControl("lblMsg"));
  18.             Label lblId1 = (Label)dllEvntImages.FindControl("lblId");
  19.             Label lblKey1 = (Label)dllEvntImages.FindControl("lblKey");
  20.             Image evntImage1 = (Image)dllEvntImages.FindControl("evntImage");
  21.             //lblMsg1.Visible = true;
  22.             lblId1.Text = objNE.Id.ToString();
  23.             lblKey1.Text = objNE.Key.ToString();
  24.             lblMsg1.Text = objNE.imgDesc.ToString();
  25.             evntImage1.ImageUrl = "~/ASHX/viewEvntImageHandler.ashx?Id=" + lblId1.Text + "&Key=" + lblKey1.Text;
  26.             objNE.Close();
  27.  
  28.  
  29.         }
  30.  

linkbutton is in a datalist.when i click on the link button another datalist should open containing the images
May 24 '10 #1
0 1034

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

Similar topics

2
3820
by: Mal P | last post by:
Hi there, I'm a J2EE fellow who (as usual) has been thrown in the deep end and have to learn a fair chunk of the .NET platform (VS, ADO, WebForms, C# etc) in roughly two days. I'm doing ok so...
1
3741
by: Dino Novak | last post by:
I have one datalist with another datalist in item template section. I can sucessfuly use link buttons with defined commandnames from first datalist. What do you have to do to enable link buttons...
0
1668
by: Homa | last post by:
Hi, I have a nested DataList, say a datalist of customer (outer) and order (inner). for the inner DataList, I want to get the idCustomer in DataBinding time. How to I access to this...
1
1767
by: Luis Esteban Valencia | last post by:
I have a datalist. This is the code. I have 2linkbuttons and it depends of a field to show one or the other. The IF clause is OK, but its showing me the links in BLACK not in blue! and they are...
3
1971
by: Derek | last post by:
I have a nested datalist with a dropdownlist. I need to capture the selectedvalue of the dropdownlist so I can update a database table. My question then is...how do I get the value from the...
2
1489
by: Laura K | last post by:
I would like to create a nested datalist inside the selecteditemtemplate of a datalist. My hope is that when a user clicks on a link a set of child links is displayed. For example if the user...
1
1942
by: schapopa | last post by:
Hi, I have nested datalist and I have some events that work, but I cannot find out how to refresh child and parent datalist after executing events on the child datalist. My childdatalist is an...
1
2648
by: AJ | last post by:
Hi all, With the following code in mind : <asp:DataList ID="dlOne" DataKeyField="myField1" DataSource="<%# GetDataSource1()" Runat="server"> <ItemTemplate> Output Value Here! <asp:DataList...
3
8238
by: mroffey | last post by:
Hi everyone, I've been having this problem and I've searched high and low, but I can't seem to find the answer to what is probably a very simple solution. In a nutshell, I have a nested...
0
1648
by: Brian Lowe | last post by:
I'm in a web page and I have hierarchical data so I'm using 2 nested DataList controls. DataList1 is using a data source with rows of , , and where MoreData is a list. DataList1 has an...
0
7099
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
7123
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
7319
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
5430
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,...
1
4864
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...
0
4559
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...
0
3069
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...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
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 ...

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.