Click here to Skip to main content
Rate this: bad
good
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;
 
  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 8-Jan-13 21:31pm
Edited 8-Jan-13 21:35pm
Jibesh16.6K
v2

1 solution

Rate this: bad
good
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 ?
  Permalink  

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

  Print Answers RSS
0 George Jonsson 175
1 Kornfeld Eliyahu Peter 169
2 Zoltán Zörgő 139
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2014
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