Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
protected void lbkSelect_Click(object sender, EventArgs e)
{
  LinkButton btndetails = sender as LinkButton;

  GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer;

  txtID.Text = GridView1.DataKeys[gvrow.RowIndex].Value.ToString();
  lblAirlineName.Text = gvrow.Cells[0].Text;
  lblDeparture.Text = gvrow.Cells[1].Text;
  lblArrival.Text = gvrow.Cells[2].Text;
  lblDuration.Text = gvrow.Cells[3].Text;
  lblStops.Text = gvrow.Cells[4].Text;
  Label labelPrice = (Label)gvrow.Cells[5].FindControl("Label1");

  lblPrice.Text = labelPrice.Text;

  this.ctlModalPopupExtender.Show();
}

On applying watch to this.ctlModalPopupExtender.Show(); it shows me:
expression has been evaluated and has no value. And it does not display value on popup.

[Edit/ Code Block Added by Jibesh /Edit]
Posted
Updated 8-Jan-13 20:35pm
v2

1 solution

"expression has been evaluated and has no value." means the debugger ran the expression and it didn't return any thing. It means the Show method has no return value, but the debugger ran it.

What is a modalpopupextender ? Is it part of the AJAX library ? You're doing a postback, so you're not using AJAX ( unless the AJAX library is doing it ) ? If you're doing an AJAX postback, why do you want to ask an AJAX control to show itself as well ?

I don't use the ASP.NET AJAX library ( it's horrendous ) but this article ModalPopupExtender from Server Side Code[^] seems to indicate that what you're doing is right. The control will, of course, not show when you call the method in the debugger, the method would just tell the control to show itself when the page is rendered. You know that, right ?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900