468,115 Members | 2,021 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,115 developers. It's quick & easy.

Edit WebPart settings for all users?

Don
I am creating my first WebPart and Im having trouble figuring out how
everything works together.

How do I configure a WebPart with settings that will be the same for
all users?

For example, I have a WebPart and I want an administrator to configure
the ConnectString name which will determine which database
ConnectString is pulled from the web.config. But once this is
configured it will be the same for all users.

But, there can be many instances of this WebPart on the page and they
may connect to different database. So and admin may setup one WebPart
to connect to the database for customer A, and anther to connect to
the database for customer B.

I have several parameters that will work like this, the connect string
is just an example.

Ive tried working with the various editor controls but they all seem
to work on a per-user basis.
Thanks,
Don
Oct 27 '08 #1
4 1938
Hello Don,

How do u store settings now? Do u use personalization for this http://msdn.microsoft.com/en-us/libr...e9(VS.80).aspx
?

---
WBR,
Michael Nemtsev [Microsoft MVP] :: blog: http://spaces.live.com/laflour
:: http://twitter.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
DI am creating my first WebPart and I’m having trouble figuring out
Dhow everything works together.
D>
DHow do I configure a WebPart with settings that will be the same for
Dall users?
D>
DFor example, I have a WebPart and I want an administrator to
Dconfigure the ConnectString name which will determine which database
DConnectString is pulled from the web.config. But once this is
Dconfigured it will be the same for all users.
D>
DBut, there can be many instances of this WebPart on the page and they
Dmay connect to different database. So and admin may setup one
DWebPart to connect to the database for customer A, and anther to
Dconnect to the database for customer B.
D>
DI have several parameters that will work like this, the connect
Dstring is just an example.
D>
DI’ve tried working with the various editor controls but they all seem
Dto work on a per-user basis.
DThanks,
DDon
Oct 27 '08 #2
Hello Don,

How do u store settings now? Do u use personalization for this http://msdn.microsoft.com/en-us/libr...e9(VS.80).aspx
?

---
WBR,
Michael Nemtsev [Microsoft MVP] :: blog: http://spaces.live.com/laflour
:: http://twitter.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
DI am creating my first WebPart and I’m having trouble figuring out
Dhow everything works together.
D>
DHow do I configure a WebPart with settings that will be the same for
Dall users?
D>
DFor example, I have a WebPart and I want an administrator to
Dconfigure the ConnectString name which will determine which database
DConnectString is pulled from the web.config. But once this is
Dconfigured it will be the same for all users.
D>
DBut, there can be many instances of this WebPart on the page and they
Dmay connect to different database. So and admin may setup one
DWebPart to connect to the database for customer A, and anther to
Dconnect to the database for customer B.
D>
DI have several parameters that will work like this, the connect
Dstring is just an example.
D>
DI’ve tried working with the various editor controls but they all seem
Dto work on a per-user basis.
DThanks,
DDon
Oct 27 '08 #3
Don
I have a custom editor, that inherits from EditorPart and saves
changes to the database. The WebPart reads this data the same for
every user.

In addition, I have the an appearance editor that enabels each user to
make changes so persoanlization is used with this control.


On Oct 27, 5:37*pm, Michael Nemtsev [MVP] <nemt...@msn.comwrote:
Hello Don,

How do u store settings now? Do u use personalization for thishttp://msdn..microsoft.com/en-us/library/z36h8be9(VS.80).aspx
?

---
WBR,
Michael *Nemtsev [Microsoft MVP] :: blog:http://spaces.live.com/laflour
::http://twitter.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

DI am creating my first WebPart and Im having trouble figuring out
Dhow everything works together.
D>
DHow do I configure a WebPart with settings that will be the same for
Dall users?
D>
DFor example, I have a WebPart and I want an administrator to
Dconfigure the ConnectString name which will determine which database
DConnectString is pulled from the web.config. *But once this is
Dconfigured it will be the same for all users.
D>
DBut, there can be many instances of this WebPart on the page and they
Dmay connect to different database. *So and admin may setup one
DWebPart to connect to the database for customer A, and anther to
Dconnect to the database for customer B.
D>
DI have several parameters that will work like this, the connect
Dstring is just an example.
D>
DIve tried working with the various editor controls but they all seem
Dto work on a per-user basis.
DThanks,
DDon
Oct 28 '08 #4
Hello Don,

Well, there is no "per-instance" storage for web parts, by default.
What you can do is to differ your web parts by name or generate new GUID

---
WBR,
Michael Nemtsev [Microsoft MVP] :: blog: http://spaces.live.com/laflour
:: http://twitter.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
DI have a custom editor, that inherits from EditorPart and saves
Dchanges to the database. The WebPart reads this data the same for
Devery user.
D>
DIn addition, I have the an appearance editor that enabels each user
Dto make changes so persoanlization is used with this control.
D>
DOn Oct 27, 5:37 pm, Michael Nemtsev [MVP] <nemt...@msn.comwrote:
D>
>Hello Don,

How do u store settings now? Do u use personalization for
thishttp://msdn.microsoft.com/en-us/library/z36h8be9(VS.80).aspx

?

---
WBR,
Michael Nemtsev [Microsoft MVP] ::
blog:http://spaces.live.com/laflour
::http://twitter.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo

DI am creating my first WebPart and I’m having trouble figuring out
Dhow everything works together.
D>
DHow do I configure a WebPart with settings that will be the same
for
Dall users?
D>
DFor example, I have a WebPart and I want an administrator to
Dconfigure the ConnectString name which will determine which
database
DConnectString is pulled from the web.config. But once this is
Dconfigured it will be the same for all users.
D>
DBut, there can be many instances of this WebPart on the page and
they
Dmay connect to different database. So and admin may setup one
DWebPart to connect to the database for customer A, and anther to
Dconnect to the database for customer B.
D>
DI have several parameters that will work like this, the connect
Dstring is just an example.
D>
DI’ve tried working with the various editor controls but they all
seem
Dto work on a per-user basis.
DThanks,
DDon

Oct 29 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Paal Berggreen | last post: by
3 posts views Thread by Jav | last post: by
4 posts views Thread by Arnab das | last post: by
1 post views Thread by =?Utf-8?B?QXJubw==?= | last post: by
5 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.