L
LouV
Hi all. Hope someone can push me in the right direction. I'm new to
ASP.net and I am not sure how I would fix this. I've searched
newsgroups, web sites and MSDN and haven't seen how to get around
this.
I created a master datagrid with a hypertext column. Clicking on any
item in this column opens up a detail datagrid. I did this by placing
the following URL in the URL format string in the column properties
for the hypertext column in the property builder: Details.aspx?id={0}.
In Details.aspx, I read the parameter passed through the query string
using Request.QueryString("id"). I use this parameter as the input
parameter for a stored procedure that populates the detail datagrid.
The parameter is a string and it works great. But when the paramteter
has an embedded ampersand (&), the ampersand and everything after it
is not returned by the Request.QueryString("id"). For example, when
the querystring is Details.aspx?ItemA, the details for ItemA are
returned by the stored procedure and populates the datagrid. But when
the querystring is Details.aspx?ItemB&C, the database is queried for
ItemB instead of ItemB&C because the &C was dropped. When I do a
rollover on the hypertext on the master datagrid, I can see that the
URL to be executed is Details.aspx?ItemB&C. But when I step through
the code in detail.aspx, the Request.QueryString("id") returns ItemB.
So somewhere before the detail.aspx is loaded, ASP.net truncates the
string.
Does the string need to be Details.aspx?ItemB&&C for it to pick up the
ampersand? How would I do this in the URL format string in the
property builder? Or do I have to do this in code somehow? Thanks
in advance for any guidance.
ASP.net and I am not sure how I would fix this. I've searched
newsgroups, web sites and MSDN and haven't seen how to get around
this.
I created a master datagrid with a hypertext column. Clicking on any
item in this column opens up a detail datagrid. I did this by placing
the following URL in the URL format string in the column properties
for the hypertext column in the property builder: Details.aspx?id={0}.
In Details.aspx, I read the parameter passed through the query string
using Request.QueryString("id"). I use this parameter as the input
parameter for a stored procedure that populates the detail datagrid.
The parameter is a string and it works great. But when the paramteter
has an embedded ampersand (&), the ampersand and everything after it
is not returned by the Request.QueryString("id"). For example, when
the querystring is Details.aspx?ItemA, the details for ItemA are
returned by the stored procedure and populates the datagrid. But when
the querystring is Details.aspx?ItemB&C, the database is queried for
ItemB instead of ItemB&C because the &C was dropped. When I do a
rollover on the hypertext on the master datagrid, I can see that the
URL to be executed is Details.aspx?ItemB&C. But when I step through
the code in detail.aspx, the Request.QueryString("id") returns ItemB.
So somewhere before the detail.aspx is loaded, ASP.net truncates the
string.
Does the string need to be Details.aspx?ItemB&&C for it to pick up the
ampersand? How would I do this in the URL format string in the
property builder? Or do I have to do this in code somehow? Thanks
in advance for any guidance.