473,387 Members | 1,757 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,387 software developers and data experts.

Help: Usercontrol - different behaviors based on parent

I have a usercontrol that is basically a webapp-wide menu (dropdownlists,
etc...)

Is there a way I can program a certain dropdownlist in the uc to act
differently BASED on who is currently using the uc?
Nov 17 '05 #1
3 1327
Yes you can.

You can either do it with a switch statement depending on the user, or a
session/placeholder.

I guess it really depends on how differently the different user's UC will
look.

But to answer you question...yes.

HTH,

bill


"VB Programmer" <gr*********@go-intech.com> wrote in message
news:ea**************@TK2MSFTNGP11.phx.gbl...
I have a usercontrol that is basically a webapp-wide menu (dropdownlists,
etc...)

Is there a way I can program a certain dropdownlist in the uc to act
differently BASED on who is currently using the uc?

Nov 17 '05 #2
Are you saying to use a public var, like CurrentParentForm, to keep track of
which one their looking at?

"William F. Robertson, Jr." <wf*********@kpmg.com> wrote in message
news:OV****************@TK2MSFTNGP11.phx.gbl...
Yes you can.

You can either do it with a switch statement depending on the user, or a
session/placeholder.

I guess it really depends on how differently the different user's UC will
look.

But to answer you question...yes.

HTH,

bill


"VB Programmer" <gr*********@go-intech.com> wrote in message
news:ea**************@TK2MSFTNGP11.phx.gbl...
I have a usercontrol that is basically a webapp-wide menu (dropdownlists, etc...)

Is there a way I can program a certain dropdownlist in the uc to act
differently BASED on who is currently using the uc?


Nov 17 '05 #3
You can have the user control, like on its Page_Load method, check to see
what user it is, and then change the content of the page that way. If you
use the same logic to decide on the content of the page on first load and
post back, that control will keep track itself of what content was on the
page.

bill
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:uy*************@TK2MSFTNGP10.phx.gbl...
Are you saying to use a public var, like CurrentParentForm, to keep track of which one their looking at?

"William F. Robertson, Jr." <wf*********@kpmg.com> wrote in message
news:OV****************@TK2MSFTNGP11.phx.gbl...
Yes you can.

You can either do it with a switch statement depending on the user, or a
session/placeholder.

I guess it really depends on how differently the different user's UC will
look.

But to answer you question...yes.

HTH,

bill


"VB Programmer" <gr*********@go-intech.com> wrote in message
news:ea**************@TK2MSFTNGP11.phx.gbl...
I have a usercontrol that is basically a webapp-wide menu

(dropdownlists, etc...)

Is there a way I can program a certain dropdownlist in the uc to act
differently BASED on who is currently using the uc?



Nov 17 '05 #4

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

Similar topics

2
by: paul meaney | last post by:
All, myself and another developer have been staring blankly at a screen for the past 48 hours and are wondering just what stunningly obvious thing we are missing. We are trying to load up 2...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
2
by: lotus | last post by:
HI All.. I'm realtively new to C#. I have MainForm which includes Parent usercontol, and this parent usercontrol also contains child usercontrol. MainForm --> Parent usercontrol --> child...
0
by: davidr | last post by:
Hi, I've read about bubble events and setting up the event args and several other methods to have an event that occurs in a usercontrol flow up to the parent. The problem is each one entails a...
0
by: Joe | last post by:
Anyone have any experience using custom snaplines? I have a usercontrol that acts as a container for several child controls. I wrote an inherited ControlDesigner to handle some custom actions...
53
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code,...
10
by: Benton | last post by:
Hi there, I have a UserControl with a couple of textboxes and a couple of buttons ("Save" and "Cancel"). The Click event for this buttons is in the UserControl's codebehind of course, so here's...
3
by: marfi95 | last post by:
My application consists of basically a treeview on the left side, along with a panel control that takes up the right side. When nodes are clicked on the left, the data on the right side of the...
6
by: sundarvenkata | last post by:
Hi All, I have a custom UserControl that is used as the list item in a listbox in my main WPF window. Is it possible to have key bindings that apply to every instance of the user control? For...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.