Joma Rajab

Joma Rajab

  • NA
  • 110
  • 51.3k

how to pass integer parameter to query string

Jul 27 2016 10:39 PM
I need to pass int data to Id when I redirect to the page but the id is being read as string when I put it between " " and I tired the code below but I got error conversion failed when converting the varchar value to data type int 
 
when I did it in asp.net tag it works fine
 

<a href="View.aspx?Id=<%# Eval("MaId") %>"></a>


  1. Response.Redirect("View.aspx?Id="+ HttpContext.Current.Request.QueryString["MaId"].ToString());  
  2.   
  3.   
  4. nd this also not working   
  5.        Response.Redirect("View.aspx?Id="+  Eval("MaId") );  
please help  

Answers (3)