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

ObjectDataSource Requires Current User ID

I have a page with a GridView, which uses an ObjectDataSource control to
obtain the data.

The ObjectDataSource control calls a static method on a class I've created.
However, this method needs an argument that is the user key of the current
user.

I know how to use GetUser() to get a MembershipUser object and use the
ProviderUserKey property. But how can I get the ObjectDataSource to use
this?

Is there an even that would allow me to set this somehow?

Thanks!

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

Jan 4 '08 #1
2 1531
Jonathan Wood wrote:
I guess I didn't think of taking that approach. I was going for a more
generic one that would work with any ID passed.
there is one:
http://msdn2.microsoft.com/en-us/library/57hkzhy5.aspx
ObjectDataSource.SelectParameters

Regards
Jan 5 '08 #2
That's a large page so I could've missed it, but I'm not seeing anything
there where I could use Membership.GetUser().ProviderUserKey as the
argument. Did I miss it?

I think what is needed is an event where I can provide the value, but I
couldn't see an appropriate one.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

"maciek kanski" <ni***********@sie.mailawrote in message
news:47**********************@mamut2.aster.pl...
Jonathan Wood wrote:
I guess I didn't think of taking that approach. I was going for a more
generic one that would work with any ID passed.
there is one:
http://msdn2.microsoft.com/en-us/library/57hkzhy5.aspx
ObjectDataSource.SelectParameters

Regards
Jan 5 '08 #3

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

Similar topics

1
by: Dotnet Gruven | last post by:
I've posted this in the adonet group, however it was suggested I might have better luck here.... ============================================================= I'm trying to use a typed dataset and...
12
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press...
4
by: Jim Hammond | last post by:
It would be udeful to be able to get the current on-screen values from a FormView that is databound to an ObjectDataSource by using a callback instead of a postback. For example: public void...
2
by: J055 | last post by:
Hi I've implemented caching for my ObjectDataSource. <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" EnableCaching="True" CacheDuration="10" CacheExpirationPolicy="Sliding" ...
1
by: MTomov | last post by:
Hi fellas, has anyone managed to get ObjectDataSource to work Datasets where the Dataset is used as BusinessEntity class? What I mean is the following architecture: 1.WebPage with...
2
by: J055 | last post by:
Hi I have a method with the following signature: public bool UpdateSetAccounts(int items) { } How do I pass a collection of selected values in a ListBox to this ObjectDataSource...
1
by: Barry L. Camp | last post by:
Hi all, Wondering if someone can help with a nagging problem I am having using a GridView and an ObjectDataSource. I have a simple situation where I am trying to delete a row from a table, but...
5
by: Randy Smith | last post by:
Hi ALL, I wonder if anyone has been using n-tier to bind to a GridView control by using the ObjectDataSource. This is our first OOP web application, and we have no tables. Right now we are...
2
by: Aamir Ghanchi | last post by:
Hi, Why does the Update method of an ObjectDataSource class requires parameters for each of the Bind input controls of a FormView? I have a class (say MyObjectDataSource) that is being used as...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.