Hi,

I've got a datagrid in which I need to create a link or button to submit a form crosspage passing in a value from the row in the datagrid

Any thoughts on the best way of handling this?

The datagrid holds a list of manuscripts. If the manuscript has been accepted for publication I need to provide a link to the secure payment page (which has been written in classic asp), so need to pass in the manuscript number and other user specific details. I don't want to use the querystring as I don't want users to be able to modify the querystring which is why I want to submit a form

html Code:
  1. <asp:textbox id="txtMS_No" Runat="server" Visible="False"></asp:textbox>
  2. <asp:textbox id="txtUser_Id" Runat="server" Visible="False"></asp:textbox>
  3. <asp:textbox id="txtFull_Name" Runat="server" Visible="False"></asp:textbox>
  4. <asp:textbox id="txtAffiliation" Runat="server" Visible="False"></asp:textbox>
  5. <asp:textbox id="txtAddress" Runat="server" Visible="False"></asp:textbox>
  6. ...
  7. <asp:datagrid id="dgMySubmissions" runat="server" CssClass="DGR_MAIN" AutoGenerateColumns="False">
  8.     <AlternatingItemStyle Cssclass="DGR_ALTERNATE"></AlternatingItemStyle>
  9.     <ItemStyle CssClass="DGR_ITEM"></ItemStyle>
  10.     <HeaderStyle CssClass="DGR_HEADER"></HeaderStyle>
  11.     <Columns>
  12.         <asp:TemplateColumn HeaderText="Date submitted">
  13.             <ItemTemplate>
  14.                 <%# DataBinder.Eval(Container.DataItem, "Submit_Date").ToString()%>
  15.             </ItemTemplate>
  16.         </asp:TemplateColumn>
  17.         <asp:TemplateColumn HeaderText="MS no. (Ver no.)">
  18.             <ItemTemplate>
  19.                 <%#FormatMSNo( _
  20.                      DataBinder.Eval(Container.DataItem, "MS_No").ToString(), _
  21.                      DataBinder.Eval(Container.DataItem, "Version_No"), _
  22.                      ...
  23.                          )%>
  24.             </ItemTemplate>
  25.         </asp:TemplateColumn>
  26.         <asp:TemplateColumn HeaderText="Title">
  27.             <ItemTemplate>
  28.                 <%#FormatTitle( _
  29.                     DataBinder.Eval(Container.DataItem, "MS_No").ToString(), _
  30.                     DataBinder.Eval(Container.DataItem, "Version_No"), _
  31.                     DataBinder.Eval(Container.DataItem, "Title").ToString(), _
  32.                     ...
  33.                 )%>
  34.             </ItemTemplate>
  35.         </asp:TemplateColumn>
  36.         <asp:TemplateColumn HeaderText="Status">
  37.             <ItemTemplate>
  38.                 <%#TranslateStatus( _
  39.                               DataBinder.Eval(Container.DataItem, "Sub_Status").ToString(), _
  40.                               DataBinder.Eval(Container.DataItem, "Status").ToString(), _
  41.                               DataBinder.Eval(Container.DataItem, "MS_No").ToString(), _
  42.                               ...
  43.                                  )%>
  44.             </ItemTemplate>
  45.         </asp:TemplateColumn>
  46.     </Columns>
  47. </asp:datagrid>


vb Code:
  1. ' Code behind
  2. Public Function TranslateStatus(ByVal sSub_Status As String, _
  3.                 ByVal sStatus As String, _
  4.                 ByVal sMS_No As String, _
  5.                 ...
  6.                 ) As String
  7.  
  8.     Dim sb As New StringBuilder
  9.  
  10.     ...
  11.  
  12.     Select Case sSub_Status.ToUpper
  13.                 ...
  14.         Case "R"
  15.         If sStatus.ToString.ToUpper = "PRD" Then
  16.             ' Any author on the MS can upload print quality files
  17.             sb.Append("<br><a href=""submission.aspx?page=" & clAct.Encrypt(5) & "&ms_no=" & clAct.Encrypt(sMS_No) & "&ver_no=" & clAct.Encrypt(iVer_No.ToString) & """ title=""Accepted paper upload print quality files"">Upload print quality files</a>")
  18.             sb.Append("<br><a href=""https://www.......bj/"" title=""Opt 2 pay"">Opt2Pay</a>")
  19.         End If
  20.     End Select
  21.     Return sb.ToString()
  22. End Function

Any thoughts or pointers on this will be greatly appreciated

Cheers Al