Note that there are some explanatory texts on larger screens.

plurals
  1. POError: Object Reference is not set to an instance of object
    primarykey
    data
    text
    <p>I'm currently developing an application that will give user capability of downloading demo software from link provided by us in his email address. After 24 hours, now I have done through link shown in his email address, and he can download but in the coding of disable of this link .. I'm getting error my code is ..</p> <pre><code>protected void btn_sub_Click(object sender, EventArgs e) { cn.Open(); objInquiry.Name = txt_name.Text.ToString().Trim(); objInquiry.MobileNo = txtMobileNo.Text.ToString().Trim(); objInquiry.EmailId = txt_eid.Text.ToString().Trim(); objInquiry.InquiryFor = "Agriculture Product Marketing comity System".ToString().Trim(); objInquiry.Message = txt_msg.Text.ToString().Trim(); using (DataSet ds = objInquiry.InsertInquiry()) { Msg.Visible = true; Msg.Text = "Thank U For Inquiry We Will Send Demo Link To Your Email Please Check Your Email Regularly"; } try { DateTime dt1 = Convert.ToDateTime(Request.QueryString["period"].ToString()); DateTime dt2 = DateTime.Now; TimeSpan ts = dt2 - dt1; if (ts.TotalMinutes &gt; 5) { Response.Write("Download time is over"); } else { MailMessage mail = new MailMessage(); mail.From = new MailAddress("abc@gmail.com"); mail.To.Add(txt_eid.Text); mail.Subject = txtInquiryFor.Text; mail.IsBodyHtml = true; mail.Body = "Welcome Mr." + txt_name.Text + "&lt;br&gt;&lt;br&gt;"; mail.Body += "To ShreeHans Webnology" + "&lt;br&gt;&lt;br&gt;"; mail.Body += "Thank u for putting inquiry for" + txtInquiryFor.Text + "&lt;br&gt;&lt;br&gt;"; mail.Body += "Please Click on Following Link To Download Your Demo" + "&lt;br&gt;&lt;br&gt;"; mail.Body += "&lt;a href=\"http://www.test.co.in/ConatctUs.aspx?period=" + DateTime.Now + "'\"&gt;Download Demo Software&lt;/a&gt;"; SmtpClient smtp = new SmtpClient(); smtp.Host = "smtp.gmail.com"; smtp.Port = 587; smtp.EnableSsl = true; smtp.Credentials = new System.Net.NetworkCredential("abc@gmail.com", "*****"); smtp.DeliveryMethod = SmtpDeliveryMethod.Network; smtp.Send(mail); } } catch (Exception ex) { ex.ToString(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
 

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