<a href='PMInfo.aspx?PMID=<%#Eval(Request.Form["MyRadioButton"]) %>' >党员基本资料</a><asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="True" CssClass="gridview_m" 
                PageSize="5" onpageindexchanging="GridView1_PageIndexChanging" 
                onrowdatabound="GridView1_RowDataBound">  
<Columns>
<asp:TemplateField HeaderText="操作">
          <ItemTemplate>
            <input name="MyRadioButton" type="radio" value='<%# Eval("PMID") %>' /> 
          </ItemTemplate>
 </asp:TemplateField>
</Columns>
            </asp:GridView>
a和GridView在同一页面

解决方案 »

  1.   

    好吧。通过JS控制,JS更改a标签herf的内容。简单一个例子
    <a id="a" href=""></a>
    <input name="MyRadioButton" type="radio" value='<%# Eval("PMID") %>' onclick="Cheak('MyRadioButton')" />  
    <script type="text/javascript">
        function Cheak(id) {
            var value = document.getElementById(id).value;
            document.getElementById("a").href = "abc.aspx?xxxx"
        }
    </script>
      

  2.   

    请问楼上document.getElementById("a").href = "abc.aspx?xxxx"中的
    xxxx就是PMID=<%#Eval(Request.Form["MyRadioButton"]) 
      

  3.   

    后台不可以吗?直接跳转传递this.GridView1.Rows["行索引"].FindControl("单选ID")
      

  4.   

    同一个页面里一个标签直接引用另外一个标签的值肯定是不行。Request.Form["MyRadioButton"]你获取的请求的值来自同一个页面肯定是不行的。4楼给出的JS实现方法可行。
      

  5.   

    建议通过JS,不然为这个小问题就Post页面太不划算了
    <a id="dynamicA" href='PMInfo.aspx?PMID=<%#Eval(Request.Form["MyRadioButton"]) %>' >党员基本资料</a><ItemTemplate>
      <input name="MyRadioButton" type="radio" value='<%# Eval("PMID") %>'
           onclick="document.getElementById("dynamicA").href += this.value;" />  
    </ItemTemplate>
      

  6.   

    onclick="document.getElementById("dynamicA").href = 'PMInfo.aspx?PMID' + this.value;" />
      

  7.   

    我也想着同一个页面怕是不能,后面用了个简单的方法解决了,LinkBtton