Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Problem in loading form

$
0
0

I am expereriencing a problem in loading a form. I have created a single form to add new detail and updating an existing detail. For update, I have binded its data in page load its working fine. But when  i try to create new record, it is showing value can not be null errror. here, is code for page_load() :

string qr = Request.QueryString["id"];
        if (qr != "" || qr != null)
        {
            int id = int.Parse(Request.QueryString["id"]);
            SqlDataReader dr;
            string sql = "select * from tbl_activity where activity_id=" + id;
            dr = m.selectQry(sql);
            if (dr.Read())
            {
                txt_title.Text = dr[1].ToString();
                Editor1.Content = dr[2].ToString();


            }
            dr.Close();
        }

Thanks in advance


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>