Click here to Skip to main content
12,557,291 members (44,513 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET
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;
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 8-Jan-13 20:31pm
Updated 8-Jan-13 20:35pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

"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 ?

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.161026.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100