-2

Please Click Here for Code sample

SAM
  • 89
  • 1
  • 6

1 Answers1

1

Can you post your .cs code? (Just to get idea how you are handling the click event.)

From the code what I can think of the possible solution is (in code behind file):

    void lnkBtn_Command(Object sender, CommandEventArgs e) {
             string s = "You clicked: " + e.CommandArgument;
    }
  • thanks kirtan for your reply.... here is my .cs code behind `protected void lnkBtn_Command(object sender, CommandEventArgs e) { string btnNumber = e.CommandArgument.ToString(); lblTitleid.Text = btnNumber; this.ModalPopupExtender1.Show(); Data_Retrieve(); }` – SAM Mar 05 '17 at 10:21
  • I get no data, i mean null (" ") value. bro i want to pass table td value in .cs code behind but i get "" (null) value. – SAM Mar 05 '17 at 10:52
  • Ok.. Then can you try this: `commandargument="<%# Eval("BOOKID" )%>"` – Kirtan Shah Mar 05 '17 at 11:06
  • bro i already try this: `commandargument="<%# Eval("BOOKID" )%>"` but it shows same result (null). – SAM Mar 05 '17 at 11:21
  • In such a case I can think of two options. 1. Add onClick event handler `OnClick="lnkBtn_Command"` and read the argument. 2. Add `CommandName="<%# Eval("BOOKID") %>"`. – Kirtan Shah Mar 05 '17 at 13:42