Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
See more:
Am trying to pass value to another page using the querystring but not getting value of querystring. below code contains the querystring .
XML
<ItemTemplate>
                                               <asp:HyperLink ID="Hyplapprover" runat="server" NavigateUrl='<%# Eval("mbo_req_id", "MBO_Approver_Edit.aspx?mbo_req_id={0}") %>'  >View</asp:HyperLink>
                                           </ItemTemplate>


What will the error?
Posted
Updated 1-Apr-14 20:49pm
v2
Comments
Tom Marvolo Riddle 1-Apr-14 7:12am    
Query string is correct.Check whether it has values or not
Tom Marvolo Riddle 1-Apr-14 7:12am    
Getting any error?
Ni!E$H_WAGH 1-Apr-14 7:26am    
No not getting any error and also not showing any value in the querystring
Tom Marvolo Riddle 1-Apr-14 7:59am    
put a breakpoint in datasource and check whether it has values or not
Ni!E$H_WAGH 2-Apr-14 0:15am    
How to get value on the page load ?, When I put this code in button click it shows value for querystring.
lblempcc.Text = Request.QueryString("mbo_req_id")
MsgBox(Request.QueryString("mbo_req_id"))

use below code:-

string id="abbb";
Response.Redirect("Yourpage.aspx?abc"= +id);


use the value of abc as below:

string xyz= request.querystring["abc"].tostring();
 
Share this answer
 
v4
Comments
Member 10476757 1-Apr-14 7:06am    
'mbo_req_id' check this is it having a value or not
 
Share this answer
 
try this :
C#
<itemtemplate>
 <asp:hyperlink runat="server" id="MyLink" text="<%# Eval(" field=") %>" navigateurl="MBO_Approver_Edit.aspx.aspx?mbo_req_id=<%# Eval("DatasourceField") %>" xmlns:asp="#unknown"></asp:hyperlink>
</itemtemplate>
 
Share this answer
 
issue solved by adding Handles Me.Load at page Load
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900