problem using datalist / how to get value of a control from datalist

Hi all

I have a datalist where i m having one linkbutton(where i display name of product )

when i retrive data in datalist on page load

there are many rows in datalist....

what i wnat is

i want details of the product in OTHER.ASPX on click of linkbutton which is in datalist

 can anyone pls help me out....???

 

 

Vimal

0
vimalrupera
8/23/2008 9:57:55 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

2 Replies
890 Views

Similar Articles

[PageSpeed] 22

insstead of using link button and use link that will open a new window with Other.aspx and passing a query string like this

<a href="other.aspx?productId=<%Container.DataItem("[ur product id fieldname in db]") %>


Yasser
Spica.
www.spica.ae
www.bncnetwork.net
Please remember to mark as answers if this helps
0
shayas
8/24/2008 5:14:30 AM

check this article

http://weblogs.asp.net/scottgu/archive/2006/01/07/434787.aspx

download the sample and see the code. it should help u

 


Jai Ganesh. J , GSD ,India

Please Mark As Answer If my reply helped you.
0
Ganesh
8/24/2008 5:18:54 AM
Reply:

Similar Artilces:

How can I dynamically access control inside DataList ItemDataBound event when SeparatorTemplate is used for DataList control?
Hello, Usually I can dynamically access control (Label in this case) inside DataList ItemDataBound event using this code: Dim Label1 As Label = e.Item.FindControl("Label1")Label1.Text = "sample text" But when custom SeparatorTemplate is used for DataList control, then this code no longer works and produces this error: Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code...

DataList control inside another dataList control...
one of my aspx page requires to display data from a master table and show another set of data inside each row from a child table i tried by putting a datalist another datalist but could not make it i get errors :: CODE :: Dim ObjChildRental As DataList() Dim StrRentalSql As String = "select rentalid,startdate,enddate,amount,lookup.lookupname as curr from rental inner join lookup on lookup.lookupid=rental.currencyid where rental.propertyid=1" ObjChildRental = DLPropertyMaster.FindControl("dlpropertymaster:_ctl0:dlrental") M.BindDataList(ObjChild...

How do I get get values of controls inside datalist?
How do I get values of controls inside datalist?   For example, if I have a label inside header template or item template or footer template? Is there anyway to change property of label or any other controls inside those template as well? I would really appreciate if anybody can just post a sample code or a helpful link about datalist? Would really like to know more about the events fired for datalist, itembound, itemcreating etc?   hey there,I used this page to work out how to use datalists http://www.eggheadcafe.com/tutorials/aspnet/d89d1d96-03f1-4784-bbb2-a3db1af...

using javascript getting value from textbox when edit button is clicked and both controls are present in gridview control
Hi All using javascript I want to get value  from textbox when edit button is clicked and both controls that is texbox and button are present in gridview control .Alok Hi aloksinha83, Please see this post: http://forums.asp.net/t/1069245.aspx Thanks,Qin Dian TangMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help....

problem adding control to a datalist control
I am really frustrated when adding a linkbutton control to a dalalist server control. I use a datalist in my project and want to add the sort function to the list myselft. So I put a linkbutton control in the Headertemplete. However, the linkbutton is not added in the codebehind file automatically. when I define the linkbutton control explicitly in the codebehind and run the project. I always get an error due to the control always has a <undefined value>. Is it a well-known problem? I searched google and this forum not finding any thread that helps. Anybody knows why? ...

I Used Repeater inside the Datalist now i want to get value of Repeater (textbox control)
I Used Repeater inside the Datalist now i want to get value of Repeater (textbox control) on button click. Button is inside the datalist, Outside repeater.  Depending on datalist "groupId" Repeater is loding and from the repeater i want the value of "Textqty". This is my code <asp:DataList ID="DataList1" runat="server" class="SubContentSearch" DataSourceID="ObjectDataSource1" Width="496px" DataKeyField="id"><ItemTemplate> <asp:Label ID="groupIdLabel" runat="server" Te...

Using Repeater control within DataList control
I have two database tables categories and sub_categories. I'm using a DataList to display the categories in two columns, I want to be able to show two sub_categories under each category. I have the following code and I cannot work out how to do this. Please note, I've tried <asp:ControlParameter, this doesn't work as I'm using MySQL, so the solution has to be any way other than this. The code is below:<asp:DataList ID="dltCats" runat="server" DataSourceID="srcCats" RepeatColumns="2" Width=...

datalist get control value
I have the following datalist: <asp:DataList id="dlMedia" runat="server" RepeatDirection="Horizontal" RepeatColumns="5" DataKeyField="MediaID" OnItemCommand="dlMedia_ItemCommand" OnUpdateCommand="dlMedia_UpdateCommand"> <ItemStyle HorizontalAlign="Center" /> <AlternatingItemStyle CssClass="alternatingphoto" />  <ItemTemplate>   <span class="normaltext">    <asp:Label ID="lblPhotoTitle" runat="ser...

Find a datalist control within a datalist control on page load
I'm trying to find  datalist3 which resides in  datalist1 so I can make it invisible.  What I want to do his hide datalist3 on page load if a particular type of customer accesses that page.  This works fine in other contols on page load, but I'm not sure how to find a control in a datalist on page load. This is what I have.  Below the error.  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'hides price info contained in datalist3 from if they are customer type P LBPrevie...

Issue with getting values from child controls in a gridview, to use for the update using a SQLDataSource control
Hi all, I have a gridview bound with a SQLDataSource. I am using the Update feature of the SQLDataSource to update a SQL Server database with values entered into the gridview. However I am not getting it to work. I believe this is due to the controls that contain the user entries are not the gridview itself, but rather child controls within the gridview. I have been using the names of the actual controls but nothing happens. Upon submit, the screen returns blank, and the database is not updated. Here is some code:   <asp:GridView ID="GridEditSettlement" runat="server" AutoGenerate...

How to get value from all controls in datalist?
I want to get the values from all controls in a datalist but I can't find the correct syntax for this. I have this code:         Dim i As Integer        Dim _item As DataListItem         'Loop through datalist        For i = 0 To DataList1.Items.Count - 1            _item = DataList1.Items(i)            Dim lbl As Label = _item.FindControl...

How to get control inside datalist web server control
hi, I am using <asp:hyperlink id="hyper"> control in one datalist control, i want to bind url at the time of itemdatabound event so please suggest me how to get this controls handle   See if this works (in C#): protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e) { HyperLink hl = e.Item.FindControl("hyper") as HyperLink; hl.NavigateUrl = "whatever"; }  ...

datalist get control ID problem
i can update a textbox within my dataList during editing by doing this in the event handler: public void EditRowHandler (Object src, DataListCommandEventArgs e) { // put the selected row into edit mode. dl1.EditItemIndex = e.Item.ItemIndex; // get the textbox ID TextBox myTB = (DropDownList) dl1.Item.FindControl("myTB"); // populate it myTB.Text = "Hello World!" I am now trying to do the same from a normal function not an event handler. but I am struggling. can anyone tell me how to find and update my TextBox whe...

getting values insided datalist control
 Hi I have to get values from the asp:datalist through onUpdateCommand .My controls e.g. text box is lying inside the itemtemplate. And I have a link button to which I have assigned update command. How can I get values from text boxes. I am using <asp:Textbox />thanks  protected void ddlist_UpdateCommand(object source, DataListCommandEventArgs e) {  textbox txt=new textbox(); txt=(textbox)e.item.findcotrol("u r textbox id");  string str=txt.text; }happy codingLive and Let Live Thanks for reply. This works for me.But how to update the values insi...

Web resources about - problem using datalist / how to get value of a control from datalist - asp.net.presentation-controls

Email Domain Datalist Helper
What if someone signs up for your web app and they type in their email address as susan_smith@gmaoil.com? They don't notice, they never get their ...

South-west Marine Reserves Network - Resources
[toc on_off::hide=0 on_off::automatic=0 on_off::min_limit=5 box::title=Contents box::minlevel=2 box::maxlevel=2 box::hide_show=1 box::collapsed=1 ...

HTML5无障碍支持解决方案
工作正在进行中:实例解决方案 返回 表的图例 & 说明: “不支持" - 意味着如果提供有建设性意义的变通方案仍不能被浏览器支持。 “部分支持” - 意味着建设性意义的变通方案在浏览器中提供一些无障碍支持。 “没实现” - 意味着新特性在浏览器中仍然没有实现。 “支持” - means ...

銆婄函鐪熺殑骞翠唬銆嬬1闆哶楂樻竻鍦ㄧ嚎瑙傜湅_鏂版氮澶х墖_鏂版氮缃?/title>
... 鏂扮櫧鍙戦瓟濂充紶 鏄庢湞澶╁惎鍥涘勾锛屽箍鍏冨湴鍖鸿繛骞撮ゥ鑽?.. 娓╁窞涓€瀹朵汉 銆婃俯宸炰竴瀹朵汉銆嬩互涓€鎴锋櫘閫氫汉瀹剁殑... 闃垮浣块亾浼?/a> 銆婇樋濞樹娇閬撲紶銆嬩互鏈濋矞鏃朵唬涓鸿儗鏅?.. 鐑棬瑙嗛 姝e湪鍔犺浇...璇风◢绛墌 ${++dataList_index} ...

Adactio: Journal
The thoughts and ramblings of Jeremy Keith, a web developer living in Brighton in southern England.

datalist experiment
demo implementation of datalist element

Issues for pfeldman - Code Review
Keyboard Shortcuts File u : up to issue m : publish + mail comments M : edit review message j / k : jump to file after / before current file ...

Google’s new Chrome Beta 24 is 26% faster than last year’s browser
... the Octane Javascript benchmark. For developers, there are tons of new features in Chrome Beta 24 including new un-prefixed APIs, MathML, datalist ...

Accessible Mozilla: Firefox 24
Alex's blog Wednesday, July 10, 2013 Here's a list of Firefox 24 (currently Aurora ) improvements for assistive technology. ARIA We supported ...

Google Chrome 24 Released, Claims 26% Speed Improvement
Google today released a new version of its browser. On the Octane benchmark, this version is claimed to have 26% speed improvement over the last ...

Resources last updated: 12/21/2015 5:03:46 PM