hi, i have this code and this code not working properly
code in one.aspx
<asp:HiddenField runat="server" ID="hfDistrict" Value='<%# Eval("District")%>' />
<asp:HiddenField runat="server" ID="hfDistCode" Value='<%# Eval("DistCode") %>' />
<asp:LinkButton runat="server" ID="btn_NoOfA" PostBackUrl="~/AcData.aspx" Text='<%# Eval("NoOfCount") %>' />
Code in AcData.aspx
string k = ((HiddenField)PreviousPage.FindControl("hfDistrict")).Value;
also try this code
string DistrictN1 = Request.Form["hfDistrict"]
but i did not get value from previous page
actually we need to remove querystring from old code and not want to use session and we are try to use postbackurl to pass value from one.aspx to AcData.aspx.
what is the exact problem i was doing and what will be the solution. plz provide solution thanks and regrds
What I have tried:
code in one.aspx
<pre><asp:HiddenField runat="server" ID="hfDistrict" Value='<%# Eval("District")%>' />
<asp:HiddenField runat="server" ID="hfDistCode" Value='<%# Eval("DistCode") %>' />
<asp:LinkButton runat="server" ID="btn_NoOfA" PostBackUrl="~/AcData.aspx" Text='<%# Eval("NoOfCount") %>' />
Code in AcData.aspx
string k = ((HiddenField)PreviousPage.FindControl("hfDistrict")).Value;
also try this code
string DistrictN1 = Request.Form["hfDistrict"]