I
Ixnay
Thanks in advance for any help you can give me on this.
I am trying to include the value from a request.querystring in the
DataNavigateUrlFormatString
I am able to include one of the values which comes from the database
to make a link with the syntax
http://server/work_order.asp?WorkOrder=12345678&Site=NYC but I cannot
get the NYC value to work from a request.querystring when submitted
from http://server/default.aspx?Site=NYC
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" CellPadding="4"
Font-Size="Small" ForeColor="#333333" GridLines="None">
<Columns>
<asp:HyperLinkField
DataNavigateUrlFields="Work_Order"
DataNavigateUrlFormatString="http://server/work_order.asp?WorkOrder={0}&Site="
DataTextField="Work_Order"
HeaderText="LinkField"
Target="_blank" />
DataNavigateUrlFormatString="http://server/work_order_print.asp?WorkOrder={0}&Site=<%=Site
%>"
Becomes
<a
href="http://server/work_order.asp?WorkOrder=12345678&Site=<%=Site
%>
If I try
DataNavigateUrlFormatString="http://server/work_order.asp?WorkOrder={0}&Site="
+ <%=Site %>
It errors with
DataNavigateUrlFormatString="http://server/work_order.asp?WorkOrder={0}&Site="
+') is not allowed within a
'System.Web.UI.WebControls.DataControlFieldCollection'.
Line 27:
DataNavigateUrlFormatString="http://server/work_order.asp.asp?WorkOrder={0}&Site="
+ <%=Site %>
Thanks again from a new asp.net user.
I am trying to include the value from a request.querystring in the
DataNavigateUrlFormatString
I am able to include one of the values which comes from the database
to make a link with the syntax
http://server/work_order.asp?WorkOrder=12345678&Site=NYC but I cannot
get the NYC value to work from a request.querystring when submitted
from http://server/default.aspx?Site=NYC
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" CellPadding="4"
Font-Size="Small" ForeColor="#333333" GridLines="None">
<Columns>
<asp:HyperLinkField
DataNavigateUrlFields="Work_Order"
DataNavigateUrlFormatString="http://server/work_order.asp?WorkOrder={0}&Site="
DataTextField="Work_Order"
HeaderText="LinkField"
Target="_blank" />
DataNavigateUrlFormatString="http://server/work_order_print.asp?WorkOrder={0}&Site=<%=Site
%>"
Becomes
<a
href="http://server/work_order.asp?WorkOrder=12345678&Site=<%=Site
%>
If I try
DataNavigateUrlFormatString="http://server/work_order.asp?WorkOrder={0}&Site="
+ <%=Site %>
It errors with
DataNavigateUrlFormatString="http://server/work_order.asp?WorkOrder={0}&Site="
+') is not allowed within a
'System.Web.UI.WebControls.DataControlFieldCollection'.
Line 27:
DataNavigateUrlFormatString="http://server/work_order.asp.asp?WorkOrder={0}&Site="
+ <%=Site %>
Thanks again from a new asp.net user.