Hi is it possible to do the following?
<a href='/Reports/report.aspx?StartDate=<% Request.Params.Get('StartDate'); %>&EndDate=<% Request.Params.Get('EndDate'); %>'>View analysis</a>
Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sure, it is possible! You would need to resolve the quotes, first and secondly, you should be using the ASP.NET Response.Write syntax (
<%=Expression%>):But is it recommended? I would think not. Reasons may range from opening up potential security holes (allowing unchecked querystring data to be used) to plain readability issues to code separation. Remember, this is the way Classic ASP code was written before ASP.NET came along.
It would be much better to perform this logic in the code-behind after checking the querystring for valid values and assigning the NavigateUrl of an
asp:HyperLinkcontrol.