Note that there are some explanatory texts on larger screens.

plurals
  1. POValue Not Changing
    primarykey
    data
    text
    <p>In my Project I am Checking some conditions if it is true the action will Occur otherwise the Error message will be shown in the Label during the runtime.</p> <p>My problem is that when the condition fails the cursor goes to the else block and the code also get Excecuted but the text of the Label is not changed.What could be the Problem? </p> <p>The Condition part is,</p> <pre><code> if (ds.Tables[0].Rows.Count &gt; 0 &amp;&amp; DateTime.Parse(frmtxtdt.Text).ToString("dd/MM/yyyy") == DateTime.Today.ToShortDateString() &amp;&amp; DateTime.Parse(totxtdt.Text).ToString("dd/MM/yyyy") == DateTime.Today.ToShortDateString()) { ds.Tables[0].TableName = "Passkeys"; ds.WriteXml(Server.MapPath("~/XMLReports/_Passkeys.xml")); string filename = Server.MapPath("~/Upload/Pkey_rpt.rpt"); rpt.Load(filename); rpt.SetDataSource(ds); rpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "Passkeys"); } else if(frmtxtdt.Text.Trim() !=null &amp;&amp; totxtdt.Text.Trim()!=null) { if (DateTime.Parse(frmtxtdt.Text).ToString("dd/MM/yyyy") == DateTime.Today.ToShortDateString() &amp;&amp; DateTime.Parse(totxtdt.Text).ToString("dd/MM/yyyy") == DateTime.Today.ToShortDateString() &amp;&amp; ds.Tables[0].Rows.Count == 0) { lblmsg.Text = "Pass Key Not Yet Delivered for the Selected Date..."; //The value(lblmsg.Text) not Changing when comes here. } else { lblmsg.Text = "There is No Schedule for the Selected date...."; //The value(lblmsg.Text) not Changing when comes here. } } } catch { throw; } </code></pre> <p>Friends My problem is not about [Datetime] or [Datetime Picker] it is that, The text of the label is Changing at runtime but not dispalying.</p> <p>And also in the [rpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "Passkeys"); ] Crystal Report Generator in PDF file format the Report is Loading and there is also data in XML file but it is not Converted into PDF file for Download.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload