QueryString to Textbox

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

  1. PetroTiburcio

    PetroTiburcio

    Joined:
    May 17, 2013
    Messages:
    7
    Likes Received:
    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 (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
    1. Advertisements

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.
Similar Threads
  1. Hazzard
    Replies:
    2
    Views:
    885
    Yan-Hong Huang[MSFT]
    Jul 23, 2003
  2. =?Utf-8?B?Q2hyaXM=?=
    Replies:
    3
    Views:
    14,431
    Peter Blum
    Mar 30, 2005
  3. Jay

    Rich TextBox / HTML TextBox

    Jay, Apr 28, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    16,052
    Steve C. Orr [MVP, MCSD]
    Apr 29, 2005
  4. Jay

    Rich TextBox / HTML TextBox

    Jay, Apr 28, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    755
    =?Utf-8?B?TG9yZW5j?=
    Apr 28, 2005
  5. ABC
    Replies:
    2
    Views:
    936
    Praveen
    Oct 4, 2005
  6. Mehdi
    Replies:
    6
    Views:
    36,900
    sloan
    Apr 6, 2006
  7. David Wertz

    Populating textbox in Formview with a QueryString

    David Wertz, Aug 18, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    362
    David Wertz
    Aug 18, 2004
  8. Adeel Ahmad
    Replies:
    1
    Views:
    880
    Anthony Jones
    Mar 7, 2006
Loading...