473,659 Members | 2,645 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Webpart optimizations

I only want to refresh my data in my webpart when the custom properties
change. Is there an easy way to know that the user changes one of the
properties?

p.s. I have my Dataset.GetData () and DataBind() calls in the Page_PreRender
Event so I will get the latest custom property value. Is this the right
place?

May 2 '06 #1
3 1073
DWS
General Grant,

I know of no event for this. You can check in the property set method if
the value has changed and in a custom editor you can check if the property
changes in the applychanges method.

Me I know the datasource is cached so I don't worry about optimizations its
all been done forme and would rather make things the work correctly with the
highest quality than something that could potentially fail because of
optimization code techniques, but I'm just a hack.

Good Luck
DWS
"John Grant" wrote:
I only want to refresh my data in my webpart when the custom properties
change. Is there an easy way to know that the user changes one of the
properties?

p.s. I have my Dataset.GetData () and DataBind() calls in the Page_PreRender
Event so I will get the latest custom property value. Is this the right
place?

May 3 '06 #2
I built the solution using a data source to start, but I can't share them
easily across webparts. So I created a dataset. Maybe I should just cache
my dataset. :)

-John

"DWS" wrote:
General Grant,

I know of no event for this. You can check in the property set method if
the value has changed and in a custom editor you can check if the property
changes in the applychanges method.

Me I know the datasource is cached so I don't worry about optimizations its
all been done forme and would rather make things the work correctly with the
highest quality than something that could potentially fail because of
optimization code techniques, but I'm just a hack.

Good Luck
DWS
"John Grant" wrote:
I only want to refresh my data in my webpart when the custom properties
change. Is there an easy way to know that the user changes one of the
properties?

p.s. I have my Dataset.GetData () and DataBind() calls in the Page_PreRender
Event so I will get the latest custom property value. Is this the right
place?

May 3 '06 #3
You could always add a flag that gets set when the setter on the property is
called and use that to determine if anything has changed. It's a bit
tedious but not that bad really.

Rob

--
Robert L. Bogue, MS MVP, MCSE, MCSA:Security, Etc.
Blog: http://www.thorprojects.com/blog
"John Grant" <Jo*******@disc ussions.microso ft.com> wrote in message
news:63******** *************** ***********@mic rosoft.com...
I built the solution using a data source to start, but I can't share them
easily across webparts. So I created a dataset. Maybe I should just
cache
my dataset. :)

-John

"DWS" wrote:
General Grant,

I know of no event for this. You can check in the property set method if
the value has changed and in a custom editor you can check if the
property
changes in the applychanges method.

Me I know the datasource is cached so I don't worry about optimizations
its
all been done forme and would rather make things the work correctly with
the
highest quality than something that could potentially fail because of
optimization code techniques, but I'm just a hack.

Good Luck
DWS
"John Grant" wrote:
> I only want to refresh my data in my webpart when the custom properties
> change. Is there an easy way to know that the user changes one of the
> properties?
>
> p.s. I have my Dataset.GetData () and DataBind() calls in the
> Page_PreRender
> Event so I will get the latest custom property value. Is this the
> right
> place?
>

May 26 '06 #4

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

Similar topics

0
1201
by: J. Jespersen | last post by:
Hi people, I fiddling with webparts, and have created my own custom webpart from scratch. The webpart itself is contained in a myPart.dll I have two different sites. SiteA and SiteB. Both are webparts-based. I have added the webpart to my toolbox, and added it to a declarativeCatalogPart, and finally added the webpart to a webPartZone. No problemo. I have allowed the webpart for export, and have exported it to a
3
4737
by: DexHex | last post by:
Hi, I am stumpt. Is there anyway to set the background image on a webpart title?
0
1039
by: arthernan | last post by:
I have an almost finished page that uses webparts. And this is the expected functionality. A logged on user hits a button and the button opens a WebPart. Then te user logs off, next time he logs on he will find the webpart already open. Now, if a different user logs on, the fact that another user might have opeed a webpart should not affect the page. For him the page should only show webparts that were open inside his session. So this is...
2
1645
by: arthernan | last post by:
I have an almost finished page that uses webparts. And this is the expected functionality. A logged on user hits a button and the button opens a WebPart. Then the user logs off, next time he logs on he will find the webpart already open. Now, if a different user logs on, the fact that another user might have opened a webpart should not affect the page. For him the page should only show webparts that were open inside his session. This is...
3
1726
by: Jav | last post by:
I create a UserControl (.ascx), and then change it in code to: Inherits System.Web.UI.WebControls.WebParts.WebPart expecting that it will now be treated as a WebPart. But this immediately generates 2 errors. How does one go about creating a WebPart by inheriting as above? (I know that I can drag a UserControl into a WebPartZone and it will be wrapped in a GenericWebPart.) Thanks Jav
2
1354
by: MrCrool | last post by:
Hi I am trying to develop WebParts that will interact with each other to make up a highly customizable "system", but I am having trouble with the order in which the webparts connect and communicate. If you have a WebPart that is both consumer and provider it is most likely the "middle" component in your communication: It receives a value from it's provider, uses this value for some purpose, and sends it's own value on to the consumer...
0
1221
by: Manpreet | last post by:
Hi, I have a web part page with a toolbar webpart and a grid webpart. In the toolbar, I have menu-items to update a field. For selecting the value of the field I have another asp.net webform which shows the various options in a dropdownlist. This form has to be a modal form and has to be shown on click the Toolbar menu items. When the user selects an option from the drop-down list and click OK then the option selected has to be returned...
1
1732
by: =?Utf-8?B?Y2hhbmNoaXRvZGF0YQ==?= | last post by:
Hi, I want to do the following: Create a WebPart(in Sharepoint 2007) that downloads a .NET Rich Client. Well downloaded the Rich Client needs to communicate with the Web Part(through http calls). Googling around I have found examples with Webpart/Javascript communication but I have not found any examples with a Rich Client/Standalone app communication.
4
1545
by: Arnab das | last post by:
I am working in asp.net webpart.I want to show the delete warning message in a modal popup. How can I achieve this?
0
8341
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8751
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8539
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6181
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2759
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 we have to send another system
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.