Aligahk06 -

Aligahk06 -

  • 2.1k
  • 8
  • 247

invalid attempt to read when no data is present

Jan 4 2022 3:16 PM

Dear All,

Following error encountered while attempting to read dropdown to correspond text box.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Invalid attempt to read when no data is present.

Source Error:

Line 52: 
Line 53:             dr1.Read();
Line 54:             txtRegRoomNo.Text = dr1["roomno"].ToString();
Line 55:             txtRegRate.Text = dr1["rate"].ToString();
Line 56:                  

Source File: e:\LiveProject\AdminDreamPanel_HMS\Admin\index.aspx.cs    Line: 54

Please your valuable guidance and help.



Answers (4)