473,387 Members | 1,844 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.

postback help needed

Hi,

I am writing a web app in C#.

I have a webform with a drop down list box that is populated with user names.
I load this only on if not is a postback, which means it only loads the
first time user
visits the page.

this same page contains controls and the code to create a new user account.
When a new user is created I would like to reload the drop down list because
it will now have an additional user.

It is also a multi user app, so that means other people need to know of the
new user in the drop down.

I was thinking of either always reloading just the drop down list on post
back, which causes a hit on database

or.

append a new line item to bottom of the drop down list, the new user will
appear at the bottom but not in the order when normally database queried.

which is better solution, more professional, friendly, or is there an even
better way?

thanks

Chris
Nov 19 '05 #1
1 1043
Just realized that repopulating with a post back wipes out the value in my
selected changed event. It searches for the first item in the drop down list
, which is
text "Please choose a user name".

another challenge to over come.

"Chris" wrote:
Hi,

I am writing a web app in C#.

I have a webform with a drop down list box that is populated with user names.
I load this only on if not is a postback, which means it only loads the
first time user
visits the page.

this same page contains controls and the code to create a new user account.
When a new user is created I would like to reload the drop down list because
it will now have an additional user.

It is also a multi user app, so that means other people need to know of the
new user in the drop down.

I was thinking of either always reloading just the drop down list on post
back, which causes a hit on database

or.

append a new line item to bottom of the drop down list, the new user will
appear at the bottom but not in the order when normally database queried.

which is better solution, more professional, friendly, or is there an even
better way?

thanks

Chris

Nov 19 '05 #2

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

Similar topics

7
by: Michel | last post by:
Hi all, Is there some intelligent way to trigger a clientside JavaScript function before a postback is triggerd by any of the controls on a page? Thanks in advance, Michel Mathijssen
2
by: mg | last post by:
I want to hold references to several window objects var win = window.open(... in a javascript array AND not loose the elements in this array when the .aspx page is reloaded after one of...
3
by: majid | last post by:
When i show a webform as a dialogbox using showModalDialog script any postback event in dialogbox cause a new window pops up . How can i control the postback?
4
by: J Sahoo | last post by:
Hello, I have a registration page where I am collecting user information (username, password, last name, age, etc...). I made the password field as PASSWORD (field type from the textbox). If user...
1
by: Matthew Smith | last post by:
I have a situation where I have to dynamically add controls at runtime. I am not sure how to deal with postback and retaining values in textboxes. I have seen examples where you have to include...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
9
by: Robert Galvin | last post by:
Is it possible to tell which control caused a postback?
2
by: sam | last post by:
When you decode Viewstate, there last root triple is a bunch of control ids that 'participate in postback'. This is all the information i've been able to gather on the web. Does anyone know...
4
by: Gregory Gadow | last post by:
If there is a more appropriate forum, please let me know and I will post there. Our field reps can go on to our website and select from several sets of data to create the address we then provide...
0
by: btysgtmajor | last post by:
Hi all, I'm hoping I've just done something stupid here, but... I have two panels on an ASP.NET web form. When the page first loads (i.e. not a postback), I set the visibility of both panels...
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:
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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.