QueryString to Textbox

Discussion in 'C Programming' started by PetroTiburcio, May 28, 2013.

  1. PetroTiburcio


    May 17, 2013
    Likes Received:
    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 (Text):
    <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 (Text):
    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 :)
    PetroTiburcio, May 28, 2013
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.