473,407 Members | 2,546 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,407 software developers and data experts.

The best place

Hi,

where is the best place for setting components on load but only if
this is not a postback?

protected void Page_Load(object sender, EventArgs e) {
if(!Page.IsPostBack) {
//here?
}
}

Regards,
Etam.

May 27 '07 #1
2 897
On May 27, 8:42 pm, etam <odwrot...@gmail.comwrote:
Hi,

where is the best place for setting components on load but only if
this is not a postback?

protected void Page_Load(object sender, EventArgs e) {
if(!Page.IsPostBack) {
//here?
}
}

Regards,
Etam.
yup :-)

May 27 '07 #2
That's not a terrible place, although the Page_Init event might be better
depending on exactly what it is you're trying to do.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"etam" <od*******@gmail.comwrote in message
news:11**********************@m36g2000hse.googlegr oups.com...
Hi,

where is the best place for setting components on load but only if
this is not a postback?

protected void Page_Load(object sender, EventArgs e) {
if(!Page.IsPostBack) {
//here?
}
}

Regards,
Etam.
May 29 '07 #3

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

Similar topics

15
by: John J | last post by:
I've written the following code into a class to search for and display the results of all races entered (The complete code is in a previous thread). I wish to amend the code so as to display the...
5
by: Fernando Lopes | last post by:
Hi there. In your opinion, where is the best place to put the connection string of a web application? Web.config, a constant into the code? I'm not using a component server, so it's not an...
4
by: Marco | last post by:
Hi to All, I'm developing an application in VB .NET. I have a question: what is the best place to save personal settings of my users? I mean, when a user uses my application, it can create a...
3
by: Robin Tucker | last post by:
I'm a bit confused about where to put my program settings. Firstly, I can choose (I suppose) between .ini, .xml or the registry. Which one is best? Secondly, *where* do I place any files I...
10
by: Mike Logan | last post by:
I am using the "contract first" design methodology. Contract First is design the WSDL first then design the server and client. However I must design my XSD/XML Schema before anything. I am...
14
by: Jon Rea | last post by:
I am currently cleaning up an application which was origainlly hashed together with speed of coding in mind and therefore contains quite a few "hacky" shortcuts. As part of this "revamping"...
4
by: Ned Balzer | last post by:
Hi all, I am pretty new to asp.net; I've done lots of classic asp, but am just beginning to get my mind wrapped around .net. What I'd like to do is include some code that tests if a user is...
2
by: WB | last post by:
I have an app that will need to store hostorical data (path & filenames) in a combo box (so that the user doesn't have to type in the same data each time the app is restarted). Is it best to keep...
14
by: testcpp | last post by:
Hi experts, What's considered the best book to learn javascript? I searched this newsgroup but the postings are over five years old, so is there a good book to learn. I've searched Amazon and...
5
by: =?GB2312?B?17/HvyBaaHVvLCBRaWFuZw==?= | last post by:
Hi, I would like to have someone comments on what's the best practice defining error codes in C. Here's what I think: solution A: using enum pros: type safe. better for debug (some debugger...
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: 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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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,...
0
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...

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.