changes made from one user's webpart's page, effects all user's

 I am just doing this offline right now in Visual Web Developer Express 2008

I created the login in

once in the memberpage area, people can modify their webpart page.

 I created several users to test this out.  I loaded it in a browser.

When I make changes as logged in user "A" .  Then logout and login as user "B", user "B,s" webpart page has been changed to user "A".

This goes true for whomever I log in as.  It changes for everyone.

Is there something specific I need to do in order to get everyone's changes to be unique for them & not go across the board?

0
cinstress2
6/4/2008 6:36:52 PM
asp.net.personalization 3779 articles. 0 followers. Follow

15 Replies
854 Views

Similar Articles

[PageSpeed] 37

What authentication mode you are using? Maybe you are using Window Authentication? 


Regards,Vinz

"Code, Beer and Music" that's my way of being a programmer!

How to get your Forum Question Answered | Blog | CodeASP.NET
0
vinz
6/4/2008 7:30:43 PM

in my config it says

<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>

 

in another spot

<authentication mode="Forms" />

 

 

0
cinstress2
6/4/2008 8:01:09 PM

Do you have this in your Web Config settings?

<webParts>
            <personalization defaultProvider="SqlPersonalizationProvider">
                <providers>
                    <add name="SqlPersonalizationProvider" type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider" connectionStringName="SQLConnString" applicationName="/"/>
                </providers>
                <authorization>
                    <deny users="*" verbs="enterSharedScope"/>
                    <allow users="*" verbs="modifyState"/>
                </authorization>
            </personalization>
</webParts>

You may aslo refer here for more information

http://dotnetslackers.com/articles/aspnet/UsingWebPartsInASPNet20.aspx


Regards,Vinz

"Code, Beer and Music" that's my way of being a programmer!

How to get your Forum Question Answered | Blog | CodeASP.NET
0
vinz
6/4/2008 8:23:43 PM

hi

http://dotnetslackers.com/articles/aspnet/UsingWebPartsInASPNet20.aspx

uses Visual Studio. I'm using Visual Wed Developer 2008 Express.  But i'll try it anyway and see what happens

thanks 


 

 

0
cinstress2
6/4/2008 8:48:38 PM

cinstress2:

uses Visual Studio. I'm using Visual Wed Developer 2008 Express.  But i'll try it anyway and see what happens

I don't think if it matters.. Just try it..


Regards,Vinz

"Code, Beer and Music" that's my way of being a programmer!

How to get your Forum Question Answered | Blog | CodeASP.NET
0
vinz
6/5/2008 2:21:31 PM

 I figured out what exactly isn't working.

In my webpart I have some things like a calculator control and a calendar for example.  When users move those things from one webpart zone to another, the changes are saved to that unique user.

The problem is that I also created some other databases, like a to do list for example.

well when one user changes their list, it also changes the lists on the other user's page.

 

so I need to figure out how to have the other databases save the changes made by each user, but just to that particular user... not everyone

I did make sure that  the asp.net development servers are all open for each database (ie no red x is on them in the database explorer

0
cinstress2
6/5/2008 3:55:02 PM

I think that's because you are manipulating your To Do List data for All users and not for a specific users.. If you wanted to display informations there based on users credential then you need to INSERT and UPDATE the database WHERE user = @CurrentLoggedUser 


Regards,Vinz

"Code, Beer and Music" that's my way of being a programmer!

How to get your Forum Question Answered | Blog | CodeASP.NET
0
vinz
6/5/2008 4:27:17 PM

thanks, here is the sqldatasource for the to do list

I've tried adding where user= 

I get an error.  I tried  searching for the correct format, but can't seem to get anywhere.  I am using Visual Web Developer 2008 Express, target framework= .net framework 3.5

in visual basic

 

Is there someplace in this code that I need to change?  If so what is the code to add that would equal the where user= advice you wrote above

 

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
    ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    DeleteCommand="DELETE FROM [ToDolistTable] WHERE [ID] = @ID"
    InsertCommand="INSERT INTO [ToDolistTable] ([Date], [Note]) VALUES (@Date, @Note)"
    SelectCommand="SELECT * FROM [ToDolistTable]"
    UpdateCommand="UPDATE [ToDolistTable] SET [Date] = @Date, [Note] = @Note WHERE [ID] = @ID">
    <DeleteParameters>
        <asp:Parameter Name="ID" Type="Int32" />
    </DeleteParameters>
    <UpdateParameters>
        <asp:Parameter Name="Date" Type="DateTime" />
        <asp:Parameter Name="Note" Type="String" />
        <asp:Parameter Name="ID" Type="Int32" />
    </UpdateParameters>
    <InsertParameters>
        <asp:Parameter Name="Date" Type="DateTime" />
        <asp:Parameter Name="Note" Type="String" />
    </InsertParameters>
</asp:SqlDataSource>

0
cinstress2
6/5/2008 5:15:01 PM

Fisrt.. does your To Do List table has a user fields? If there is then you can just simply write a sql statements like these below..

SELECT * FROM [ToDolistTable] WHERE userId = @user

DELETE FROM [ToDolistTable] WHERE [ID] = @ID AND userid = @user

INSERT INTO [ToDolistTable] ([userId],[Date], [Note]) VALUES (@user, @Date, @Note)

UPDATE [ToDolistTable] SET [Date] = @Date, [Note] = @Note WHERE [ID] = @ID" AND userId = @user

I your ToDoList Table doesn't have a UserId field then you should add it for you to make it work..



Regards,Vinz

"Code, Beer and Music" that's my way of being a programmer!

How to get your Forum Question Answered | Blog | CodeASP.NET
0
vinz
6/5/2008 5:37:21 PM

I get an error that says

 

Must declare the scalar variable "@username".

how and where do I declare that?

(I used @username instead of @user... but neither work)

I thought maybe I could insert a loginName

but I still got the error

System.Data.SqlClient.SqlException: Must declare the scalar variable "@LoginName1".

 

0
cinstress2
6/5/2008 8:50:10 PM

you need to set it as a paramter

    <DeleteParameters>
        <asp:Parameter Name="ID" Type="Int32" />
        <asp:Parameter Name="username" Type="String" />
    </DeleteParameters>
    <UpdateParameters>
        <asp:Parameter Name="Date" Type="DateTime" />
        <asp:Parameter Name="Note" Type="String" />
        <asp:Parameter Name="ID" Type="Int32" />

        <asp:Parameter Name="username" Type="String" />
    </UpdateParameters>
    <InsertParameters>
        <asp:Parameter Name="Date" Type="DateTime" />
        <asp:Parameter Name="Note" Type="String" />

        <asp:Parameter Name="username" Type="String" />
    </InsertParameters>

Just be sure that UserName exist in your Database to get referenced with 


Regards,Vinz

"Code, Beer and Music" that's my way of being a programmer!

How to get your Forum Question Answered | Blog | CodeASP.NET
0
vinz
6/5/2008 9:04:50 PM

 I still get the same error

I think I need to do something in the datakeynames

 

 but I already have DataKeyNames="ID"

so I don't know how to do multiple

this is from the grid view 

 

0
cinstress2
6/5/2008 9:46:25 PM

Just separate it with a comma like below 

DataKeyNames="ID,username"


Regards,Vinz

"Code, Beer and Music" that's my way of being a programmer!

How to get your Forum Question Answered | Blog | CodeASP.NET
0
vinz
6/5/2008 10:17:19 PM

 I got everything to work

 

thanks 

0
cinstress2
6/6/2008 9:20:22 PM

cinstress2 :

 I got everything to work

Glad to hear that! :) 


Regards,Vinz

"Code, Beer and Music" that's my way of being a programmer!

How to get your Forum Question Answered | Blog | CodeASP.NET
0
vinz
6/6/2008 9:23:14 PM
Reply:

Similar Artilces:

Copy webparts from admin's page to regular user's page
I'm new to ASP.Net Webpart. I have a very basis question about how to copy webparts from admin's page to regular user's page. I understand that the admin could use the share mode to initially setup his webpart page. Then all other users would see the same webpart if they accesses to the same url. But let's say, if we have multiple departments, and each department has it own admin, and each department may have different webparts to be included in the page. One more requirememt that after the regular user accesses the page on the first time (after the department's admin has set the page up)...

how to change a user's mailbox but keep the user's GW id
We have a user whose email has a space between her first name and middle name, which cause the problem in sending out email or receive email from the outside the network. Can someone advise how and where I suppose to change her email name to a valid name like firstname.middlename.lastname@xxx.com from firstname middle.lastname@xxx.com? Thank you very much! On Tue, 23 Oct 2007 15:27:51 +0000, April wrote: Duplicate. -- Joe Marton Novell Support Forum SysOp Novell does not officially monitor these forums! Use the Internet override - in ConsoleOne, GroupWise Tab, Inte...

User's Name Changed
We are using Groupwise 5.5 I have a user that recently married. I have created a Groupwise alias for the new name, but how do I go about changing the Groupwise Object/User ID and NDS account ID and keep their email account intact? Thanks, J.Jensen Jeff, you can simply rename the Groupwise account. No mail loss. Uwe -- Novell Support Connection Volunteer SysOp Please don't send me support related e-mail unless I ask you to do so. ...

Replace 1's and 0's in a gridview column with Yes's and No's
Is it possible to change the display of a column in a gridview to show a Yes for all 1's and a No for 0's that display in a particular column of a gridview bound to a database?  If so, can someone share the way with me?  I am using ASP.NET 2.0 with VB Code Behind.  Thanks One way you can do is thrrough  CASE in your select statement: Select YesNoColumn= CASE yourColumn WHEN 1 THEN 'Yes' WHEN 0 THEN 'No' ELSE '' END FROM YourtableLimno <Columns>     <asp:TemplateField HeaderText="yourHeader" SortExpression="yourDataField"> ...

It's Linux !? No, it's BSD ! No, no, it's...
kFreeBSD http://wiki.debian.org/Debian_GNU/kFreeBSD a Debian distro using the FreeBSD kernel ! ObiWan wrote: > kFreeBSD > > http://wiki.debian.org/Debian_GNU/kFreeBSD > > a Debian distro using the FreeBSD kernel ! Why use a BSD kernel? I hope the reason is more than, just because they can. http://wiki.debian.org/Debian_GNU/kFreeBSD_why It's easy to understand why the would want to use Debian packages. :) -- Jimmy Johnson Registered Linux User #380263 >> kFreeBSD >> >> http://wiki.debian.org/Debian_GNU/kFreeBSD >> ...

Publishing the site's as shortcuts in the users' desktop's
Dear All,I have a web application. In that some client will be configured.In that the authorized person can publish a web page.When the page is published, the shortcut for that URL has to be set in the clients desktop.Can we achieve this functionality?Kindly help to get rid of this.Thanks a lot in advance.  Hi jayachitra  I have read the thread carefully; however, I am not sure I have understood the facing needs correctly. Based on my understanding, you would like to create a shortcut to user’s desktop, right?  If so, it is not recommended due to the security issue, the ...

Unable to access user control's user control's function\property from another user control
Hi, I used to call an user control's user control function as stated below from my user control in ASP.Net 1.1 wucCompany.wucEmployee.GetEmployeeSomething() After migrating to ASP.Net 2.0, I am unable to use any properties/functions(even the public ones) of the user control's User control's from another user control.  The way I have to do is create property\function in wucCompany which calls the wucEmployee's property\function and call the wucDepartment.GetEmployeeSomething().Since I need to do this change in too many places, I can...

login failed because user's IsApproved is false for user's account
Hi How can i detect if a user's login fails because their account is not approved yet (i.e IsApproved = false in Membership table) I am using a templated login control and if the user's login fails for this reason all that happens is that the FailureText control is displayed. How can i change the failure text if the user's account is not approved? thanks andrea Use Membership.GetUser Function this function Return a hydrated MembershipUser Object you can access its properties and check the validity see the link below http://msdn2.microsoft.com/en-us/library/40w5063z.aspxRega...

One user's email appearing in another's inbox !?!
Situtation one: UserA sends email to UserB. Email arrives at UserB inbox, but also in UserC inbox even though not addressed to him. Situation two: UserA proxies to UserB. Re-files an email from UserB-Inbox to a shared folder, owned by UserC. Once re-filed, email also appears in the inbox of User-D. In both situations, the properties on the suprious email appearing at (S1, UserC & S2, User D) have been checked, and they are definitely not on the recipient list. The usual db maintanence repair processes have been run, although a full rebuild of the mail...

Help! I cannot access the DataGrid's ItemTemplate's LinkButton's Text Atrribute 's Value!!!!!!!!!!!
I write a datagrid's ItemDataBound method as follows:   private void dgTable_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)  {   if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)   {    if(!isRole("Manager"))    {     LinkButton tmp = (LinkButton)e.Item.FindControl("lbPassed");     if(tmp.Text == "Passed")     {      ((LinkBu...

Label control's text doesn't appear to be set (in the page which has a user control )when trying to update the text property in the FormView's ItemUpdated event
Hi There,I have a user control which hosts a formview control, gridview control and a label control. The grid view is usedto show rows in the DB and when clicked to edit each row, a form view opens up in edit mode with that particular row info. So I have nothing in the item template.My first question is..is it mandatory to have smth in the itemtemplate of the form view.I have controls in edititemtemplate and insertitemtemplate.When a particular row is edited, I would like to show a status msg showing that the row has been updated.For this, I use the ItemUpdated event of the formview and try ...

Notes Driver: veto when user's fullname is the same as existing user's fullname
In the Notes Driver, I want to put the policy to veto when the current user's fullname is the same as existing user fullname is Lotus Domino Directory and and in eDirectory. How can I do the query to findout whether the user's fullname is the same as the existing ones or not. Please help.. Thanks Pattarawan. -- pattarawan pattarawan, It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply. Has your problem been resolved? If not, you might try one of the following op...

Hyperlink's, ImageURL's, and OnError's
I created an ASP:Hyperlink and set the ImageURL attribute so the link will be the image.If the image is missing, I would like it to display a 'missing image' pic that I have.  I know you can use the OnError attribute of the <img> tag to run some javascript to change it.Unfortunately I can't find a way to access the Hyperlink's Image that is inside it, so I can add an Attribute so the resulting <img> tag will have an OnError attribute inside of it.Any help?If my Hyperlink is called 'foo'....would I do...  ((Image) foo.Controls[0]).Attributes.Add(&...

One user's advanced search seems to be broken, while all other's seem to be fine
Greetings, Following upgrade from 2.22.3 -> 3.0.3, one user (a manager of course), noticed that all his advanced searches were returning zarro boogs. If I perform those same queries, I get the proper results. If I email him the URL for the results of that query he sees the proper results. Additionally, I cannot seem to "impersonate" this user, though I can any others. He was in the admin group, but I've removed him from that group. This is on RHEL3 with Perl 5.8.0 Any sugguestions on how to track down the cause of this would be most helpful. Thanks, B...

Global Variables (C#'s Static or VB's Shared) global to just user or any user?
Global Variables (C#'s Static or VB's Shared) global to just user or any user? If I had to guess, I'd say it would only persist on that post back and only for that user, but I'm not sure. Anyone know for sure? Thanks Darren-DarrenNeese.com-DNN ROCKS!-DeveloperSchool.com static and Shared with member variable declaration means that they are "shared" to all instances of the class (basically it means shared within the type since static members exist even if you don't have class instance). It's no way related to user, e.g it's as global as it can get, for each and every user.Thanks,Te...

DataSet's DataTable's and TableAdapter's Oh My!
Here is my situation.  I am using VB as my programming language.I am creating a part of a website that will be the admin section.  I want the admin to be able to add/edit data in a set of tables that normal users can't.  There are 20 lookup tables that I use in the website that I want the admin to be able to manage (i.e. add, edit, delete, insert).  I don't want to create 20 separate web pages (one for each table).  I have one page that has links to all the tables.  Each link has a "table" querystring variable associated with it.  When the...

Who's show is SN? Steve's or Leo's?
I don't want to start anything (honestly)! Just want to ask a simple question. Does the Security Now podcast belong to Steve Gibson or Leo Laporte? Maybe I'm in a world all to myself, but when I listen to the excellent SN podcasts, I want to hear STEVE, not Leo. But especially in the past few shows, it seems Leo will repeatedly interrupt Steve in the middle of a sentence that I want to hear the rest of. I consider this very rude of Leo. Steve is making a point that I (we) want to hear, then looses his train of thought after Leo barges in and asks something. It...

Guru's..?? Any do's and/or dont's for Zfd4 and Citrix..?
We've got a nw6/sp5 network with GW 6.5, bm3.7 and zfd 4.01 up'n'running.. Now we're adding a citrix server ( win2003) to the mix, will supply a couple off app's to users over the internal VPN in another city. Probably we'll skip the AD phase since we can not see any app and/or user with the need for AD. So,, any special considorations..? tip's'tricks..? known issues...? t.i.a... On Mon, 16 Aug 2004 15:57:10 GMT, Emerson wrote: > So,, any special considorations..? tip's'tricks..? known issues...? biggest one... zfd4.x d...

Can I hide a user control's control from the hosting page's client script?
Okay, my previous question was not unswered and I guess you can't hide a control's panel with server code then show it with client code. Now this is what I try to do: on the hosting page's onload event, call a function to hide the user control's penal. Here is the deal: the user control was looped as many times as data required. So the penals will be name mypanel1, my panel2, etc... that is not even a problem if I know if the following is true: * Do all server codes finish running before the page get sent back to the client? Say the database gave me 5 penals, I can then determine how...

411 it's pconsole, 51 it's NWPMW32, 65 it's ???
I like to give some of my users controll over their print jobs. In Netware 3.x to 4.x it was pconsole. In Netware 5.x it was NWPMW32. I don't seem to be able to find the same type of utility for Netware 6.5? We don't like to give user access to nwadmin and the NWPMW32 I copied from my 51 server (TID 10075273) to the 65 server won't display the jobs. Mmccabe, It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply. Has your problem been resolved? If not, you might try o...

Repost: FF won't show gif's nor jpg's Red X's
XP sp2 FF 2.0.0.4 extentions: Adblock Plus Copy plain text Fasterfox Firebug FireFTP McAfee SiteAdvisor NoScript Talkback Video Downloader Pic's show red x's. These pics show just fine in Internet Explorer and Netscape. Anyone have any ideas????? Fasterfox, I guess. See what happens if you disable it (or just disable its pipelining feature). -- �Q� =============== Thank you Q. I disabled all of them, one at a time (restarting each time) and the problem still exists :-( digimomma On 7/12/2007 5:26 PM digimom inquired: > Thank y...

One User's Mail Can't Be Printed by Another User
Greetings all-- There is one user here whose email can't be printed. When a second user tries to print, the message "An error occurred during this process" appears. Printing other email and from other applications is fine. Has anyone seen anything like this before? Where does the problem lie, in user A (the sender) or in user B (the recipient)? In user B's case, I removed GW, ran the GW Cleaning Agent, defragged, etc, reinstalled GW and still she can't print user A's email. (I can print user A's mail, but then I'm an Admin.) This is GW 5.5 ...

Dynamically load the dll's on user's selection
Hi ,  I am in a need to load the dll's dynamically ,based on user's selection and get them added to the References of Solution Explorer in the application(VS 2008,c#) .How can I proceed with this requirement? Any pointers to this would be of great  help. Thanks in advance.   You can use System.Reflection.Assembly.Load().Hope it helps. Jef Claes~~~~~~~~~~Visit my blog Pratibha_Pillai:Hi ,  I am in a need to load the dll's dynamically ,based on user's selection and get them added to the References of Solution Explorer in the application(...

Compare a Group's objectSid to a user's primaryGroupId
Dunnry, this question is related to my quest that you solved yesterday about how to get a primary group for a user. The difference is this time I try to a a list of users that are member of a given group.When using the member property to get a list of members of a given Group (e.g. GroupA), it didn't list those users whose primaryGroup is GroupA. So I am thinking to use a filter like (primaryGroupID= GroupA's Objectsid) when search users.However, the GroupA's objestSid is byte[] type, and the primaryGroupID is int type. Though the method in yesterday's post "CreatePrimaryGroupSID" ...

Web resources about - changes made from one user's webpart's page, effects all user's - asp.net.personalization

Resources last updated: 2/14/2016 6:53:38 PM