CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 8/4/2003 4:07:46 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 48 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
macha27
Asp.Net User
prevent double method call8/4/2003 4:07:46 AM

0/0

Hi,

In my custom control, I have the following method:
private string GetUniqueId() {

object o = Page.FindControl(WatchThis);
return ((o==null)? String.Empty : ((Control)(o)).UniqueID.ToString());
}
This method is called in two places:
protected override void Render(HtmlTextWriter writer) {}
and an event handler
protected void TextChanged(object sender, EventArgs e) {}
How can I prevent this method from being called twice (Page.FindControl is expensive).

Where should I place this method call so that it is called once, set a private variable and use that private variable where needed (or any better way to do this).

Thanks,
-ron
vga
Asp.Net User
Re: prevent double method call8/4/2003 1:18:50 PM

0/0

If it is valid for your scenario you could save the reference to the Control returned by the first call to FindControl and save it for later usage. That said, I dont really think FindControl could be considered that much expensive.
Victor Garcia Aprea
Microsoft MVP | ASP.NET

Looking for insights on ASP.NET?, read my blog: Followers of the IHttpHandler !!
macha27
Asp.Net User
Re: prevent double method call8/5/2003 12:14:54 AM

0/0


Victor,

Thanks for the reply but do you mind showing me *how* (save reference for later usage) to do it?

Thanks,
-ron
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Core Java 2: Fundamentals Authors: Cay S. Horstmann, Gary Cornell, Pages: 784, Published: 2004
Tax Law Design and Drafting Authors: Victor Thuronyi, Pages: 1186, Published: 1996
Windows XP for Dummies Authors: Andy Rathbone, Pages: 432, Published: 2004
The Fungal Community: Its Organization and Role in the Ecosystem Authors: George C. Carroll, Donald T. Wicklow, Pages: 976, Published: 1992
Visual Basic 2005: How to Program Authors: Harvey M. Deitel, Pages: 1513, Published: 2006

Web:
prevent double method call - ASP.NET Forums prevent double method call. Last post 08-04-2003 8:42 PM by macha27. 2 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
Double-catheter method to prevent dislodgement during percutaneous ... Background: We evaluated the utility of the double-catheter method to establish the track for percutaneous transhepatic cholangioscopy (PTCS). ...
Prevent double posting with Post-Redirect-Get (That's partly because I never use GET and I'm not completely sure how/when/why to do so.) Has anyone used the PRG method for preventing double-posts? ...
TechChicken: Using Lightbox to prevent form double submit Oct 20, 2006 ... Using Lightbox to prevent form double submit ... It works also with links that try to call form.submit() method: this class saves previously ...
Settings spring mvc with annotation to prevent double submit ... to prevent double submit's. How can one achieve the same effect just using ... If you successfully process the submit, call the setComplete() method on that ...
Preventing multiple page requests after double-clicks (Tom ... Jan 10, 2008 ... Does anyone else have any good techniques for preventing double-submissions? If so, let me know-- I'd enjoy hearing about other ways of ...
JavaServer Faces - JSF How to prevent double click ? I am working on this preventing double click issue from almost 10 days. ... doFilter() method returns, save the response content and the current form-id in ...
Double-catheter method to prevent dislodgement dur...[Gastrointest ... Double-catheter method to prevent dislodgement during percutaneous transhepatic ... BACKGROUND: We evaluated the utility of the double-catheter method to ...
Kerio: Kerio Winroute Firewall => Prevent Double Login Prevent Double Login [message #52390], Sat, 03 May 2008 11:53 Go to next .... Well, IP reservation method is better than Authentication. ...
Disable button to prevent double clicking One thing that the code does is to call . ... There is a simple method of preventing multiple submits not only from one button but all ...

Videos:
full automatics clay bricks making machine Manufacturer cly machine extruder prudoct hamgam sanat started the development of brick manufacturing factories more than 26 years a go. More than one hundred hamgams designed, built and supp...
FSX: From 9 fps to 33 fps - Serious Performance Increases =====IMPORTANT INSTRUCTIONS===== In order for your textures to be properly converted, I have compiled a very descriptive and easy to understand guide...
Portuguese Bowline This method makes the knot quick and easy to tie. It is useful when you expect a blow and need to take a few turns around your winch to use as an ad...
Quinny Buzz 3 Pushchair 2008 - Kiddicare The Quinny Buzz is immediately recognisable by it's superb design and unique automatic fold-out system. Thanks to a specially performed ergonomic sea...
Final Fantasy 7 - fastest gil In this 10-minute segment, I get roughly 8.7 million gil and 8840 AP. In a typical 2-hour run at this, about that of a full loop, I get nearly 100 m...
Quinny buzz 3 Pushchair Product Features (2008) - Kiddicare The Quinny Buzz is immediately recognisable by it's superb design and unique automatic fold-out system. Thanks to a specially performed ergonomic sea...
Charlie Rose - Fouad Siniora / Alan Furst Segment 1: Fouad Siniora, the Prime Minister of Lebanon talks about the crisis in the Middle East. Segment 2: Author Alan Furst, dicusses his new bo...
Authority-driven design presentation An introduction to the concepts of capability-based security.
Dan Brown - Martin Luther - Da Vinci code - protestant discovery? The Roman Catholic Church was involved in a much greater hoax - one that deals with the very foundations of history itself. For excerpt, TOC, 'Search...
Lec 22 | MIT 3.091 Introduction to Solid State Chemistry Chemical Kinetics: The Rate Equation, Order of Reaction, Rate Laws for Zeroth, First, and Second Order Reactions Temperature Dependence of Rate of R...




Search This Site:










just starting out looking for good hosting company

need help with 1&1 hosting

handling emails to domain

dynamically loaded user control inside custom server control weirdness

spla tracking

custom image control that renders showmodaldialog()

new server control rendering problem in vvisual studio.net problem.

reordering datagrid columns & usercontrol id

need up-ti-date info on hosting vendors

hosting a website on xp pro using iis

custom datagrid

help me please, everything works fine until yesterday !!!

designer verbs for properties

ensurechildcontrols() method

dynamic control question

datalist paging with search feature

nested controls and onclick event handling

waiting for all children events before firing event

user controls: to load or not to load

no admin tool? i need help

cannot use cssclass when inheriting label

setting the position of a control

setting custom property on page at design time

dynamic control post back value

inamingcontainer. (why unique names ????)

applying a mask to a password textbox control

invoking static member

adding onclick event handler to treeview...

httpcontext in class

can not resize the control at design time

  Privacy | Contact Us
All Times Are GMT