user control problem access value from user control to a page

Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

    Default user control problem access value from user control to a page

    Thanks a lot for paying attention to my problem , i tell u the problem

    i have a main form in which i gave a login label that points to a usercontrol
    login.ascx

    in login.ascx i have user has to enter username and paaswor if it is correct
    i want that login label in the main page should be changed with userid that
    he has written in login.ascx.

    how to do it i have used property but not succeded

    public string Login_ID;
    public String MyProperty
    {

    get{


    return LoginID ;

    }
    set{
    LoginID = txtBox_LoginID.Text;//user enter the userid

    }

    submit button()
    {
    if(user=txtBox_LoginID.Text){

    LoginID=txtBox_LoginID.Text
    }

    }

    on pareent page
    i have Label login
    Page_Load()
    {
    Login.text=this.usercontrol.myproperty;
    }

    plz help me i am not able to get the result..

    --
    Message posted via [url]http://www.dotnetmonster.com[/url]

    gauravkg via DotNetMonster.com Guest

  2. Similar Questions and Discussions

    1. how to access user web control from parent page?
      Hi, I've created a user web control with 4 drop down list boxes in it. I've added this user control to my main web form page. I created the...
    2. How to access values entered in User control in the main page.
      Hi Guys, i have a user control which allows the user to enter Name& Address in text boxes. I use the same user control in the main page... ...
    3. Custom Server Control works on page but not User Control...why?
      I'm developing the DevEdit.NET server control (an online HTML editor - www.devedit.com) but there's an extremely bizarre bug. The control runs fine...
    4. Page Load fired 3 times Web user control is embedded in a custom control
      Hi, I have built a custom control that build a table with 3 cells in it. The custom control is designed to add all child controls to cell#2,...
    5. Access properties of parent page from user control
      I am trying to build a control that can only be used on a page that inherits from a custom class. This base class as a series of public...
  3. #2

    Default user control problem access value from user control to a page

    Thanks a lot for paying attention to my problem , i tell u the problem

    i have a main form in which i gave a login label that points to a usercontrol
    login.ascx

    in login.ascx i have user has to enter username and paaswor if it is correct
    i want that login label in the main page should be changed with userid that
    he has written in login.ascx.

    how to do it i have used property but not succeded

    public string Login_ID;
    public String MyProperty
    {

    get{


    return LoginID ;

    }
    set{
    LoginID = txtBox_LoginID.Text;//user enter the userid

    }

    submit button()
    {
    if(user=txtBox_LoginID.Text){

    LoginID=txtBox_LoginID.Text
    }

    }

    on pareent page
    i have Label login
    Page_Load()
    {
    Login.text=this.usercontrol.myproperty;
    }

    plz help me i am not able to get the result..

    --
    Message posted via DotNetMonster.com
    [url]http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net-controls-building/200609/1[/url]


    gauravkg via DotNetMonster.com Guest

  4. #3

    Default user control problem access value from user control to a page

    Thanks a lot for paying attention to my problem , i tell u the problem

    i have a main form in which i gave a login label that points to a usercontrol
    login.ascx

    in login.ascx i have user has to enter username and paaswor if it is correct
    i want that login label in the main page should be changed with userid that
    he has written in login.ascx.

    how to do it i have used property but not succeded

    public string Login_ID;
    public String MyProperty
    {

    get{


    return LoginID ;

    }
    set{
    LoginID = txtBox_LoginID.Text;//user enter the userid

    }

    submit button()
    {
    if(user=txtBox_LoginID.Text){

    LoginID=txtBox_LoginID.Text
    }

    }

    on pareent page
    i have Label login
    Page_Load()
    {
    Login.text=this.usercontrol.myproperty;
    }

    plz help me i am not able to get the result..

    --
    Message posted via [url]http://www.dotnetmonster.com[/url]

    gauravkg via DotNetMonster.com Guest

  5. #4

    Default Re: user control problem access value from user control to a page

    I think these links should give you the solution to your problem:
    [url]http://SteveOrr.net/faq/PassDataFromUserControl.aspx[/url]
    [url]http://SteveOrr.net/faq/PassDataToUserControl.aspx[/url]

    --
    I hope this helps,
    Steve C. Orr
    MCSD, MVP, CSM
    [url]http://SteveOrr.net[/url]


    "gauravkg via DotNetMonster.com" <u25584@uwe> wrote in message
    news:666eca6e8e5ae@uwe...
    > Thanks a lot for paying attention to my problem , i tell u the problem
    >
    > i have a main form in which i gave a login label that points to a
    > usercontrol
    > login.ascx
    >
    > in login.ascx i have user has to enter username and paaswor if it is
    > correct
    > i want that login label in the main page should be changed with userid
    > that
    > he has written in login.ascx.
    >
    > how to do it i have used property but not succeded
    >
    > public string Login_ID;
    > public String MyProperty
    > {
    >
    > get{
    >
    >
    > return LoginID ;
    >
    > }
    > set{
    > LoginID = txtBox_LoginID.Text;//user enter the userid
    >
    > }
    >
    > submit button()
    > {
    > if(user=txtBox_LoginID.Text){
    >
    > LoginID=txtBox_LoginID.Text
    > }
    >
    > }
    >
    > on pareent page
    > i have Label login
    > Page_Load()
    > {
    > Login.text=this.usercontrol.myproperty;
    > }
    >
    > plz help me i am not able to get the result..
    >
    > --
    > Message posted via [url]http://www.dotnetmonster.com[/url]
    >

    Steve C. Orr [MVP, MCSD] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139