473,320 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Using a Page variable in User Control

Hi,
I have a page with a private variable: AccountData.
This handles all of the account data and i save it in the viewstate between postbacks.
I have a User Control named - AccountFavorites that renders all of the account Favorite topics.
When a user decides he wants to cancel one favorite topic he clicks on an asp:LinkButton and it postback to the server to change the value in the Database.

however, the Control doesn't know what "AccountData" is, only the page does. how can i use the "AccountData" in a postback of the Control? or can I make the postback go to the page instead?

Thanks a lot!
Apr 17 '14 #1
0 1248

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Simon | last post by:
I have a form, "Form1" that I would normally step through using Control frm = FindControl("Form1"); foreach(Control ctrl in frm.Controls) But now I have this page as a user control loaded by a...
1
by: Dan | last post by:
I have an asp.net page default.aspx with a user control and a placeholder control. <html> <body> <form id="myform" method="post" runat="server" /> <PageHeader:Header id="header1"...
2
by: Alex Wagner | last post by:
I've been trying to gain access to the container page from within a user control. Case in point: From within the user control I need to call a method in the business layer that needs a reference...
10
by: Mike Street | last post by:
I'm looking for the best way to make se of the function is a dll user control in an ASP.NET page. I've been unable to find anything specific to demonstrate how this can be achieved. Mike
2
by: Raed Sawalha | last post by:
I have a aspx page with one user control , in the user control i have hidden field (name hdnSaved) runat server wrapped in property like following :- in documentview.ascx public string...
13
by: Michael | last post by:
I have setup a public variable in the Master Page "code-behind-file". Now I would like to set that value from the UserControl, but I can't seem to find a way to do this. Does anyone have any ideas?...
3
by: Mukesh | last post by:
Hi all I have to transfer a dataset and a string from a webform to a user control on the page without using viewstate or session or cookies . properties method is not working properly. if...
4
by: Eric | last post by:
I got a particular problem in visual studio 2005 There's a user control on page and I want to meka a cast like this MyPage mp=(MyPage)this.Page; Error is : cannot cast from...
3
by: HP | last post by:
hi there Is it possible to bind a datasource to a dropdownlist contained in a user control if datasource is positioned on the parent page of user control? I guess not, since user control...
3
by: remy.bur | last post by:
Hi, When adding an anchor (which is runat="server") in a user control, the link generated will be based on the user control location and not on the page which is using the control location. For...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.