474,028 Members | 1,564 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Not able to pass variables from page to user control

Hello, I am trying to pass variable value from an aspx page to an ascx
page, but haven't been successful. This is the code:

In the .ascx.cs file:

public string filefolder;
public string FPath
{
get {return filefolder;}
set {filefolder = value;}
}
In the .aspx file:

<era:upload id=uploadContro l runat="server"
FPath="<%#usern ame%>"></era:upload>
And in .aspx.cs file:

public string username;
username = "blahblah";
I looked at postings in many forums and almost all of them give the
same example, but it is just not working for me. The 'filefolder'
variable in .ascx.cs file is not receiving the 'username' variable
value in .aspx.cs file, 'filefolder' is empty.

Any help would be greatly appreciated. I have been trying this the
whole week and it is not working.

Thanks!

Aug 16 '06 #1
0 1632

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
3269
by: Paul Yanzick | last post by:
Hello, I am trying to develop a book tracking application for my capstone in school, and am running into a problem. The application is an ASP.Net application written in C#. The first page you go to is a login form, which will set several session variables with the name used to log in, appropriate security level and some other misc variables, and then will go to a main menu for each particular security level using Server.Transfer. ...
4
4821
by: tom | last post by:
Hi Experts, I want to pass the selectedDate value from my calender form to another web form or a web user control. Could you please show me how to do this? Thanks in advance.
9
2345
by: Frank Rizzo | last post by:
I've got a number of user controls on the web page. How can I pass some data to it? I don't see where the user control is instantiated in the page code-behind page. Thanks.
0
2454
by: ab_j | last post by:
I have a user control that contains a dropdown which I want to use as a menu on multiple .aspx pages. Basically, all I am trying to do is pass the selected value of the dropdown in the user control to the main ..aspx page. In an attempt to make it more clear on what I am talking about, here is the order of events in page life cycle (from http://www.dotnetspider.com/technology/KBPages/789.aspx) ..ascx - OnInit() ..ascx - Page_Init()
6
1906
by: darrel | last post by:
I'm still not quite sure how best to handle the passing of data between controls. This is a method I'm using at the moment: I have an XML file that contains a variety of page-centric variables. I have one control that loads the XML file, reads through it, and grabs the variables it needs. It then sets these to PUBLIC variables. Then, other usercontrols simply request that variable.
1
2438
by: dollar | last post by:
I want to ask what is the best way to pass variable between asp.net we pages, and user controls , any examples - dolla ----------------------------------------------------------------------- Posted via http://www.codecomments.co -----------------------------------------------------------------------
3
2690
by: Phillip N Rounds | last post by:
I'm writing a user control which has two states: Active & InActive. I additionally am required that there to be only one active control per page, and all logic has to be contained within the control. In its inactive state, only a single button appears. If the user clicks on this button, the control becomes active( the rest of the control's functionality becomes visible), and all other instances of this user control on the page should...
4
2668
by: simon | last post by:
hello. relatively new to vb.net, i'm using VS 2003 and .net 2.0 i have a web app that i'm i have a user control that displays a simple 1 row table as the header of the page. the user control takes one input variable, the string that will be displayed as the title of the page. example call: <uc1:Header runat=server ID="ucHeader" Title="Home Page" /> what i am looking to do on a certain page is have the "title" value be dynamic, in...
2
3514
by: simon | last post by:
Hello, relatively new .net programmer. using vb.net (v2.0) I have an aspx page that contains 2 user controls (ascx) on it. the left control is basically navigation hyperlinks the right control is basically content display depending on what was clicked in the left control. ** trying it this way to avoid using frames ** I was hoping to get some help with was how to pass info to the right
0
10509
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11580
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10270
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8660
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6614
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6785
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
5367
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3934
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.