Web Forms :: Web Parts / Want To Store User Setting In XML File ?
Oct 27, 2010iam creating a customized dashboard using web parts and i am new in web parts..i wanna a way to store user setting in XML file .. how can i achieve that ?
View 4 Repliesiam creating a customized dashboard using web parts and i am new in web parts..i wanna a way to store user setting in XML file .. how can i achieve that ?
View 4 Repliesthe Web Part for anonymous user and authenticated user is displayed differently. I faced this problem twise. First time when used Silverlight control in the Web Part and second time when used devexpress control in the Web Part. In both cases problem was with displaying for anonymous user. Silverlight control didn't display. Devexpress control lost it's styles. Both controls had properties that pointed to files. Silverlight control property pointed to the XAP file, and Devexpress control property pointed to the CSS file. It seems to me, that for anonymous user the Web Part cannot find this path or doesn't allow to link to other files.
View 1 RepliesIs it better to store images directly in a database or to just store the name of the file in the db and display that file? I would think that just storing the filename of the image would keep the db size low...
View 1 RepliesI'm looking for a way I can store username and password credentials in a web.config file & use these values to re-direct to another web service, once these are authenticated.
The process is as follows:
* User logs into our website with required credentials
* There is a link on our website which invokes a new webservice
* The webservice is a paid for subscribed service (which requires authentication)
* Usually, there is a web form for this type of web service but since we need to steam-line the process from initial application logon, the logon page is not required.
* So when the link on our website is clicked, the new webservice is invoked. Authentication should be done by using the credentials in the web.config file and user is redirected to webservice (avoiding logon page)
Could someone tell me using pseudocode or a small asp.net code example how we could achieve this process?
The key goal is to avoid user going into the Logon page and redirecting directly to the URL for usage of the webservice.
I am trying to modify a .ascx file, to declare a variable. I've read that this is normally done in the code behind view, but I do not have access to the code behind, and this is a very small addition. We are using DotNetNuke, and in the .ascx file I have written
<script runat="server">
String foo = "bar";
</script>
And this causes the page to explode. I have some experience with PHP, but am very new to .NET. Is there a way to define a variable in a .ascx file in this way? Maybe I have not imported all the correct libraries at the top of the page?
need to let users to generate online questionnaires that could be answered by other users. I was wondering if this could be done using the WebParts.I have a custom application with already set up database. I do not use any form of Membership Provider (I have a custom made form of user authentication, I did not want to be bounded by the rigid frame of the ASP Membership). As far as I know Web Parts uses db (called SharePoint ?) to store the state etc. so this might be the first problem because I do not want to modify my DB just for the sake of WebParts (I assume it would require a whole lot of changes).So I was wondering if it would be possible to use Web Parts only as a form of "ASP code generator" e.g. I could create the questionnarie using WebParts and then export the result somehow (?) to print an ascx/aspx file or code.If this can not be done, can anybody tell me if there are any components that would be useful here? Some sort of toolkit where one could create asp code online? (with textboxes, checkboxes etc.).
View 2 RepliesBelow is the code I use to store file into database but there are a few problems.
1. couldn't store file larger than 4mb
2. couldn't store doc,docx,xlsx but only .txt
my table column are:
[code]....
I am using web parts using asp.net c# 2.0 with Ajax 1.0.
I am dynamically creating and loading web parts in my code behind. Some of these web parts are pure html others are user controls. Its all working well but with one annoying issue.
When I add a new web part / remove one ( from my web part collection) this change is not reflected in the portal. Say when you add a new web part you would expect it to see in the catalog. But its not there. When I remove a web part from my collection it still appears in the portal.
However, If I delete the user's setting in the aspnet_PersonalizationPerUser table then the change is visible!
I have a web user control that contains 2 text boxes. i would like to be able to have their values persisted using the personalizable attribute, but dont want to use my user control as a web part. Can i implement the personalizable attribute on a text box in a user control without using web parts?
View 3 RepliesHow to Divide image in two parts like I have an image which width x Height = 16 x 32.
And I want to split image in two images 16x 16 and 16x 16.
How can i do it?
I have develop a web application. I have put my web application in my server and user can access from any location.
My server regional and setting is English (US). Now my problem is
1) When user access to my system and his pc setting is English (UK), it will prompt and error
and after i debug i suspect it is because of Datetime conflict (dd/MM/yyyy and MM/dd/yyyy)
2) I cannot fix or limit my user to setting his/her pc regional setting to UK
So what can i do in my web application solve this issue?
(Can i write any code in my client side (.aspx) to convert or do standardization to US)
I have a webpart with asp.net control within.I would like to hide some parts of that control, some asp:net panels etc. regarding one of the TextBox's value. The issue is that I don't know to change the visibility of asp:panel wrapper without any postback, and how to refresh page to see the changes on the UI.I was trying to implement TextChanged event but it dosen't work.
View 2 RepliesI am trying to let a user fill in profile options when they are registering. I am using the providers that come with asp.net by default.
Example: User fills in this registration form:
Username
Email
Age <- This is what I have tried to add in.
Password
Confirm Password
I got the age to show up by doing the following.
1) Adding the following code to Web.config
<properties>
<add name="Word" type="String" />
<add name="Age" type="Int32" defaultValue="0" />
</properties>
2) Adding the following code to my register.aspx view
<div class="editor-label">
<%: Html.LabelFor(m => Profile.Age) %>
</div>
<div class="editor-field">
<%: Html.TextBoxFor(m => Profile.Age)%>
<%: Html.ValidationMessageFor(m => Profile.Age)%>
</div>
I went to run it, I filled out the form and clicked register. I got this:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. and Line 127: _provider.CreateUser(userName, password, email, null, null, true, null, out status);
I have one web part (the provider) which displays insurance claims in a gridview. When user clicks on one this value(case number) is passed via IWebPartField interface to another web part(consumer) which displays detailed info about the claim. So far so good. I can select different claims in the provider and the details show up in the consumer just fine. The moment I add a TextBox to the consumer, the consumer no longer recognizes the case number passed. I need the user to be able to enter a value in the textbox and click a button to update that claim info. I can debug and attach to process and it looks like it is getting the case in the callback function, etc, but when it is setting parameters for the stored proc in CreateChildControls, it is null. Comment out the TextBox and it works fine.
View 1 RepliesIs it possible to perform user management (store user info, login , logout etc) without using session or cookie?
View 3 RepliesOur application lets the administrator create new users. Since the administrator is logged in, I have set Logincreateduser = false so that the administrator is not logged out even after creating the new user.
The problem is :I need the userid of the newly created user to store additional details of the user in another database table. I see that i can get the username using Createuserwizard1.username; but how do I get the userID?
I have a custom membership user class and custom MembershipProvider working against database. Due to security reasons the user passwords are stored in the database as hashed values. So my procedure
public override bool ValidateUser(string username, string password) is
{
//select hashed password from db
return (EncodePassword(password) == dbpassword)
}
[code]....
I have a simple ASP.NET web site with membership (using SqlMemberShipProvider). I allow users to select a theme to setup a design of the pages they like.
Now the question is: Where shall I store this selected theme per user?
My initial idea was to use profiles. So I have defined a profile property called "Theme" in the web.config file. All this works so far as long as the user has logged in to the web site.
But there remains one open point:If the user isn't logged in and enters the login page how can I make sure that he sees the login page with the theme he has selected before?
Obviously (at least I think it's obvious) I cannot pull the theme of the login page from the profile of that user as long as he hasn't logged in.
So how can I overcome this issue? Is it perhaps the wrong place to store the theme in the user profile table? Should it be better stored somewhere on the client PC of the user?
What is the best way to keep track of user specific information?
I want to show information in querys etc based upon specific properties, for instance a users belongs to a dealer, and that dealer has an ID.
So is it a good way to store that dealer ID in a session variable or should I consider a other option to use this on multiple pages.
I've got a user control with a dropdown of states. I have a State property that sets the selected value. When I add this control to a page and set the state property, it doesn't set the selected value. If I add some code in the page load event of the user control it does set the selected value.
View 10 RepliesI am working with one project like software corner !in which i upload my all software and end-user can download that software but my problem is how i store my software's(>25MB.exe files) in database ...
(I use sql server 2012) ...
I am have done a basic asp.net application User Module with out using any authentication classes.
Now I need to store last user login details in my asp page when user performs any operation. and need to show to other User who next login that ( the last user has made changes before ).
I have a user control (i.e. ascx) that comprises of two related list boxes (i.e. once you change the selected item in one list the contents of the other list update). I'm adding this user control dynamically to a page on the click event of a button (i.e. using LoadControl).I wish to set the list box datasource properties, as well as the default selected item of the parent list from my parent page so I created public properties in my user control to accomodate this. I also created an event in my user control that notifes the parent page when the selected item changes in one of the list boxes so I can update the contents of the other list box.
I understand that I have to recreate the user control on every postback in order for it to function correctly but I'm not sure exactly how I should be doing it. I've shown below what I have currently - whilst it works the problem is that on postback I'm always creating the user control with all its default properties and then updating the properties that need to change(?). For example, when the choice in theparent list box changes the datasource of the list box is set twice (once in AddControl and then again in OnParentChanged)? As the contents of the list boxes originate in a database it means I'm making unnecessary calls to the database (unless I do some something like store each unique set of data in the ViewState).
I'd be very grateful if someone could review how I've done things and illustrate how perhaps I should be doing things. I'm not sure if the way I've done this is considered the 'correct' way. For example there may be a better way of doing things would avoid setting the properties twice? I'm a bit unsure of the way I've set the datasource properties of the list boxes and bound them. I wished to set the datasource from the parent page because I might have a second user control on my page that may also use the same datasource and I could reuse it (as opposed to each control making its own call to the database) so I'd like to keep this feature if possible.It would be great if posting code in reply that you use my example as a guide so I know what you're referring to.Here's the code for my user control:
[Code]....
[Code]....
Here's the code for my containing page:
[Code]....
i like to create a web application,in that i need to get the resumes from the user,then i need to publish that resume to the manager in date wise..
View 5 RepliesHow do i store same file into multiple servers? My scenario is explained below Administrator module resides in production server ( "cccc" domain) which is accessible only within my company. Common module resides in DMZ and can be accessed by internet users. I have written a program to upload a .xls file to both the servers. My program is in administrator module and resides in cccc domain. I could upload the file to the server in my company but i cant upload it in DMZ. Following is the code to upload to ccc domain
FileInput.PostedFile.SaveAs(Server.MapPath("..TU" & ServerFileName))
Followins is the code to upload to dmz
FileInput.PostedFile.SaveAs("http://grtr/" & "/TU/" & ServerFileName) I will get the serverfilename using file upload control