473,472 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do I get the input from a user web cotnrol and build the control based on that?

Hi,

I'm building a user login control, which will accept a username and password
in textboxes and a checkbox to keep logged in - pretty much your
conventional login control.
When the user logs in, it writes a cookie to remember them, and if this
cookie exists when the control is run it just says, "Welcome back. - Click
here to logout"
It also has a hidden field, which indicates on postback the action the user
has selected, login / logout using an enum.

I've implemented INamingContainer, and IPostBackDataHandler to get the
information on postback.

The problem I have is that the control calls the CreateChildControls event
(in which I build the control in which ever form it should be) before it
calls the LoadPostData event.
This poses the problem that I can't build the control to look how it should
because I don't know what the action is until the LoadPostData event is run.

Interestingly, the order of the events changed once I implemented
INamingConatiner. Before I did that the LoadPostData event ran before the
CreateChildControls event???

So the question is, how do I dynamically build a control based on the
information retrieved in the LoadPostData event??

Thanks

Alex

Jul 21 '05 #1
0 842

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

Similar topics

1
by: NotGiven | last post by:
I need to build a query based on what the user checks in the form. For example, if the user does not check certain fields, I don' tneed to use those in the query statement. Any ideas how to...
6
by: Florian Wilhelm | last post by:
I have some easy questions, but I cant figure them out: I want to read exactly one char from stdin, there should be no need to hit enter. import sys print "Input: (y/N) ", input =...
3
by: Geoff | last post by:
I have been asked to add postal rates to a web page shopping cart checkout procedure. After contacting the post office I discovered that they used XML to receive postal rate requests and send back...
0
by: Alex Stevens | last post by:
Hi, I'm building a user login control, which will accept a username and password in textboxes and a checkbox to keep logged in - pretty much your conventional login control. When the user logs...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
8
by: David Cameron | last post by:
I noticed that using an HTMLInputRadioButton and specifying a value to be an empty string (""), this is overridden by ASP.Net which set the value of the control to be the same as the ID of the...
2
by: dath | last post by:
Hi, Searched the forum and found a lot on passing form input to aquery but not the other way around. Here is the situation: I have a timesheet form based on a subform query that asks the...
4
by: mohaaron | last post by:
I can think of a lot of reasons why this might need to be done but as far as I can tell it's not possible. I've been looking for a way to add HtmlTableRows to a table using a button click for a...
5
by: =?Utf-8?B?U2FsYW1FbGlhcw==?= | last post by:
Hi, I have a user control which I like to use in several projects (winforms) in the same solution. Inside lets say Winapp1 , When adding a reference to this control, I can dynamically or statically...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.