QueryString to Textbox

Joined
May 17, 2013
Messages
7
Reaction score
0
Hi, I have a table tblProfile, which contains fields with Id, Name, Address. I have 2 aspx page, which are Home.aspx and Here.aspx. On my Home.aspx I have used this code to pass the Id in my Here.aspx:
Code:
<asp:HyperLink ID="link" runat="server" NavigateUrl="Here.aspx?id={0}" 
                Font-Names="Times New Roman" Font-Size="Medium" >Click here</asp:HyperLink>

In code behind Home.aspx.cs:
Code:
protected void Page_Load(object sender, EventArgs e)
    {
        string bID = Request.QueryString["Id"];
        if (string.IsNullOrEmpty(Id))
        {
            Response.Redirect("Here.aspx?", true);
        }
        ViewState["Id"] = Id;
        link.NavigateUrl = String.Format(link.NavigateUrl, Id);
 
    }

I don't have any problem with passing the Id to url in 2nd page. But what I want right now is, on my Here.aspx, I have 3 textboxes which supposed to be filled by the Id, Name and Address of the certain Id that passed from the Home.aspx. Tried many but had no luck at all. Any help would be appreciated. By the way, I'm using asp.net with c#. Thanks in advance. God Bless :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top