Reference?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ll

    #1

    Reference?

    Hi,

    I have a text web control called "UserID".

    and I define a function like this:
    Private int GetUserName(int UserID)
    {
    string sql = "select * from users where UserID = " + UserID;
    ADO.Execute...
    How to assign the UserID to the TextControl(Use rID)?
    UserID.Value = UserID???
    }

    Question:
    How to assign the UserID to the TextControl(Use rID)?

    Thanks.


  • Juan Gabriel Del Cid

    #2
    Re: Reference?

    > How to assign the UserID to the TextControl(Use rID)?

    If your TextBox is named txtUserID, then you would do:

    txtUserID.Text = UserId.ToString ();

    Hope that helps,
    -JG



    Comment

    • ll

      #3
      Re: Reference?

      Thanks Juan.
      I have changed that.
      But I want to know another way around(can keep them the same name)?


      "Juan Gabriel Del Cid" <jdelcid@atrevi do.nospam.net> wrote in message
      news:%23ZZcrc5m DHA.1764@tk2msf tngp13.phx.gbl. ..[color=blue][color=green]
      > > How to assign the UserID to the TextControl(Use rID)?[/color]
      >
      > If your TextBox is named txtUserID, then you would do:
      >
      > txtUserID.Text = UserId.ToString ();
      >
      > Hope that helps,
      > -JG
      >
      >
      >[/color]


      Comment

      • Juan Gabriel Del Cid

        #4
        Re: Reference?

        > Thanks Juan.[color=blue]
        > I have changed that.
        > But I want to know another way around(can keep them the same name)?[/color]

        Another way around? What do you mean by "keep the same name?"

        -JG


        Comment

        Working...