Click here to Skip to main content
15,927,347 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: and "Arithmetic overflow error converting expression to data type datetime." Pin
eyeseetee5-Jun-08 22:05
eyeseetee5-Jun-08 22:05 
QuestionIs it possible to Get id of a row in repeater Pin
S.Aijaz5-Jun-08 20:11
S.Aijaz5-Jun-08 20:11 
AnswerRe: Is it possible to Get id of a row in repeater Pin
Gayani Devapriya5-Jun-08 21:21
Gayani Devapriya5-Jun-08 21:21 
GeneralRe: Is it possible to Get id of a row in repeater Pin
S.Aijaz5-Jun-08 21:40
S.Aijaz5-Jun-08 21:40 
GeneralRe: Is it possible to Get id of a row in repeater Pin
S.Aijaz5-Jun-08 22:08
S.Aijaz5-Jun-08 22:08 
GeneralRe: Is it possible to Get id of a row in repeater [modified] Pin
Gayani Devapriya5-Jun-08 22:18
Gayani Devapriya5-Jun-08 22:18 
GeneralRe: Is it possible to Get id of a row in repeater Pin
S.Aijaz5-Jun-08 22:53
S.Aijaz5-Jun-08 22:53 
GeneralRe: Is it possible to Get id of a row in repeater [modified] Pin
Gayani Devapriya6-Jun-08 1:54
Gayani Devapriya6-Jun-08 1:54 
Hi,
Okay, I understand your problem.
First, the event ItemDataBound fires every time you bind an item to the grid view, there for as a result your label’s text will be assigned by the last ID. You can use this to bind the JavaScript functionality. I think in this scenario that is to get the ID in to a label try this code.

Sample Code.
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
Button btnEdit = (Button)e.Item.FindControl("btnEdit");
if(btnEdit != null)
{
if (btnEdit.CommandName == "Edit")
{
Label1.Text = btnEdit.CommandArgument;
}
}
}
ItemCommand event will basically fire when you click on any button in your repeater control. I.e. either you click on edit or delete, so to identify which button you click distinctly I have marked the button’s command argument as edit, so you know you what to get the ID when you click on edit only. And assign it to the label.

Note: Make sure you are binding to the repeater when IsPostBack is false.

Thx,
Gayani

modified on Friday, June 6, 2008 8:09 AM

QuestionAuto Redirect from Paypal Pin
Krazy Programmer5-Jun-08 19:52
Krazy Programmer5-Jun-08 19:52 
AnswerRe: Auto Redirect from Paypal Pin
Bhumikabarot5-Jun-08 21:18
Bhumikabarot5-Jun-08 21:18 
AnswerRe: Auto Redirect from Paypal Pin
mdpavel6-Jun-08 7:02
mdpavel6-Jun-08 7:02 
QuestionFill table by XML document Pin
harunbagwan5-Jun-08 19:39
harunbagwan5-Jun-08 19:39 
QuestionFile upload control not accepting 15 MB document file Pin
Pankaj Garg5-Jun-08 19:12
Pankaj Garg5-Jun-08 19:12 
AnswerRe: File upload control not accepting 15 MB document file Pin
eyeseetee5-Jun-08 22:04
eyeseetee5-Jun-08 22:04 
QuestionRe: File upload control not accepting 15 MB document file Pin
Pankaj Garg6-Jun-08 1:10
Pankaj Garg6-Jun-08 1:10 
AnswerRe: File upload control not accepting 15 MB document file [modified] Pin
Gayani Devapriya6-Jun-08 3:07
Gayani Devapriya6-Jun-08 3:07 
QuestionTransfer failed to connect the server ??? Pin
koolprasad20035-Jun-08 18:19
professionalkoolprasad20035-Jun-08 18:19 
AnswerRe: Transfer failed to connect the server ??? Pin
eyeseetee5-Jun-08 22:03
eyeseetee5-Jun-08 22:03 
QuestionAutoComplete Extender Textbox With AutoPostbak Pin
Member 34533315-Jun-08 18:05
Member 34533315-Jun-08 18:05 
AnswerRe: AutoComplete Extender Textbox With AutoPostbak Pin
eyeseetee5-Jun-08 22:01
eyeseetee5-Jun-08 22:01 
GeneralRe: AutoComplete Extender Textbox With AutoPostbak Pin
Member 34533318-Jun-08 18:52
Member 34533318-Jun-08 18:52 
QuestionCSS 2.1 is not applying in IE6 Pin
For_IT5-Jun-08 17:53
For_IT5-Jun-08 17:53 
AnswerRe: CSS 2.1 is not applying in IE6 Pin
Christian Graus5-Jun-08 17:56
protectorChristian Graus5-Jun-08 17:56 
AnswerRe: CSS 2.1 is not applying in IE6 Pin
RCoate5-Jun-08 18:32
RCoate5-Jun-08 18:32 
QuestionMustOverride function - Can it ever have a different return type? Pin
RCoate5-Jun-08 16:12
RCoate5-Jun-08 16:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.