Professional Web Applications Themes

user control problem access value from user control to a page - ASP.NET Building Controls

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 ...

  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. #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

  3. #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

  4. #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" <u25584uwe> wrote in message
    news:666eca6e8e5aeuwe...
    > 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

Similar Threads

  1. how to access user web control from parent page?
    By Chris in forum ASP.NET Building Controls
    Replies: 1
    Last Post: September 29th, 09:34 PM
  2. How to access values entered in User control in the main page.
    By vineetbatta in forum ASP.NET Building Controls
    Replies: 1
    Last Post: November 7th, 01:28 AM
  3. Custom Server Control works on page but not User Control...why?
    By John Rebbeck in forum ASP.NET Building Controls
    Replies: 3
    Last Post: September 17th, 12:47 AM
  4. Page Load fired 3 times Web user control is embedded in a custom control
    By Thomas Ekegren in forum ASP.NET Building Controls
    Replies: 0
    Last Post: September 3rd, 05:37 PM
  5. Replies: 0
    Last Post: July 3rd, 06:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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