Value cannot be null.Parameter name addresses error will occur

Mar 1 2011 5:25 AM
hai,

    when i pass a query string from first page to next  page.the next page variable cannot get the query string value and the error value cannot be null,parameter name addreses error will occur.how can  i solve this

in table.aspx


<a href="mail.aspx?mailid = <%#Eval("cmpnymailid")%>">Apply Here</a>

in mail.aspx.cs

string

System.Net.Mail.

message.From =

message.To.Add(mailid1);//value cannot be null,parameter name addresses error will occur

new MailAddress(from);
MailMessage message = new System.Net.Mail.MailMessage();
mailid1 = Request.QueryString["mailid"]; 

Answers (6)