<asp:TemplateColumn HeaderText="稿件编号">
<ItemTemplate>
<asp:HyperLink runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"EventPaperID") %>'
NavigateUrl= '<%# "CommonProcessPlatform.aspx"+ "?" + "PaperID=" + DataBinder.Eval(Container.DataItem, "EventPaperID") + "&Event=" + DataBinder.Eval(Container.DataItem, "EventEvent") %>' Target=_blank ID="Hyperlink1">
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
It is noticable that in the above code, some strange variable names are used such as EventPaperID, EventEvent, etc. Those variables are used due to the SQL query is a JOIN query between tables Event and Manuscript.
The SQL statement is as follows
cmdManscript="SELECT Event.ID AS EventID, Event.Event AS EventEvent, Event.OutStanding AS EventOutStanding, Event.Date AS EventDate, Event.PaperID AS EventPaperID, Manuscript.AuthorName AS ManuscriptAuthorName FROM Event,Manuscript " + strWHERE +" And Event.PaperID = Manuscript.PaperID ORDER BY Event.Date DESC";
The following referece is good enlightening material
am using a datagrid to display 3 bound columns and a hyperlink column. I am trying to figure out if it possible to have more than one querystring parameter inserted into each hyperlink using the DataNavigateURLField. It looks like you are only able to specify one column from the datasource to insert as a value that differs for each row. The example below is one I found in the MSDN documentation which shows one DataNavigateField and its format string. -------------- <Columns> <asp:HyperLinkColumn HeaderText="Select an Item" DataNavigateUrlField="IntegerValue" DataNavigateUrlFormatString="detailspage.aspx?id= {0}" /> </Columns> -------------- Conceptually what I want to be able to do is have a format string that looks like: DataNavigateUrlFormatString="detailspage.aspx?p0={0}&p1= {1}" So that I can have two query string parameters be populated from two different columns in the datasource. The rows would have hyperlinks that would look like: www.somesite.com/somepage.aspx?p0=2&p1=23 www.somesite.com/somepage.aspx?p0=5&p1=19 www.somesite.com/somepage.aspx?p0=8&p1=99 ..... Is there a way to do this? thanks Michael | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|