Want To Create Page URL Rewrite Based On Users GUID And Display Name?
Jul 2, 2010
I am using the asp.net membership.
On my site I have a Profile.aspx page.
In the code behind of this page, i get the logged in UserId (Guid) and pass this to a method in my DAL. GetUserByUserId()
In my database I have a Table called Member which the method gets the data from and displays details on the page about the user.
What I want to happen is when they have logged in and are diverted to Profile.aspx,
the page URL shows www.MyWebSite/Profile/UsersName
for example www.MyWebsite/Profile/JohnSmith.aspx
In my Member table I have FirstName and LastName columns or do I get the name from the membership table.
even better would be they go straight to www.MyWebsite/JohnSmith.aspx
View 5 Replies
Similar Messages:
Aug 18, 2010
I need to create a web page where the user can select from a variety of categories via a dropdown list, then enter a search term into a textbox to provide a search term. The category is going to dictate which controller to use, and the search term will be a query parameter for the List action of each controller.
What I can't figure out is how to dynamically create the route based on the users selection. How do I get the values selected from the dropdownlist and textbox into Url.RouteUrl?
View 2 Replies
Aug 2, 2010
I am making a database with SQL server 2008 express edition and trying to make a GUID for new users signing up. I have the UserID field as a NVARCHAR(36) with a default value of NEWID() but all it keeps providing are all 0's for all 36 characters. How do I fix it where it provides a true GUID with all random letters/number?
View 1 Replies
Oct 14, 2010
I am in the process of building a survey using asp.net and store these results into a database. Now this is what I am trying to achieve: - The survey is fairly long but will be split up in sections. - the way I have been told to develop this is to save each section into the database when the user clicks on a next button for example rather than clicking a final submit button and then submitting the results all in one go to the database. The reason being is for example, the user's browser crashes etc or if they accidentally close it down. I need to build it such a way that survey can remember who the person is.
I can't use windows authentication as it will be externally based, is there anyway I can uniquely identify people when they arrive on the web application e.g. by using a guid? Can it be guaranteed that the person who arrives on the application with a guid on that machine be exactly the same when he/she arrives again?
View 2 Replies
Dec 9, 2010
I have a page, program.aspx. Users with different roles have a different URL.
e.g., [URL] [URL]
I also used URL rewrite to rewrite the URLs, so users will see the following URLs from the browser
[Code]....
I defined the following access rules for the above pages.
[Code]....
The problem is when the admin users access the pages, they still have access to supervisorprogram.aspx. Vice versa for the supervisor users.
View 3 Replies
Jul 23, 2010
if users press the browser's back button to reach the prior page..then page should display a message like "web page expired" in asp.net can i use javascript for this?
for example..
there are 4 pages in web sites. 1,2 and 3 can be back. but when the 4th page run then 4th page can not be back... when the user press browser's back button , diaplay ma message "weg page expired".
View 4 Replies
Oct 12, 2010
there's a label control on the master page..if its value is "Value1" ,I want this CSS Sprite to display on my webform..if the Value is "Value2"..the CSS sprite should use some different image..just the image needs to be changed ..nothing else in that Sprite..
I found out that I can use "FindControl" method to find out what value that Label Control of Master Page's currently got..
Now how do I change that image on the banner ?? How do I go about it ? Also that CSS Sprite now is a user control named "myBanner.ascx"(earlier was an aspx file)..Now do I need to make 2 diff usercontrols or I can implement some logic in one usercontrol itself ?
Should I make 2 copies of this "myBanner.ascx" with JUST the "image name" changed in its CSS ?
What I want is ONE banner which has been made using CSS Sprite ..Now if the "Label Control's "value in the master page is "Value1" then the image to be used on that banner is "IMAGE1" else if "Label Control's" value is "Value2" then "IMAGE2" should be used in that sprite..
View 1 Replies
Sep 29, 2010
i want to create a page like asp.netwebadminfiles/security/users/manageUsers.aspx
View 9 Replies
May 24, 2010
after the users login i would like to have a greeting message
eq. WELCOME RONALD MC DONALD. in aspx page...
is this possible? check my codebehind program
string strCmd;
string namesung;
strCmd = "Select EMP_NAME, EMP_NO from user where";
strCmd += " emp_no = ' " + Request.QueryString["user"].ToString() + "'";
namesung = Convert.ToString(mycommand.ExecuteScalar());
Label1.Text = " WELCOME " + namesung.ToString();
in aspx page.
<asp:Label ID="Label1" runat="server" CssClass="font2" Text="Label"></asp:Label>
View 4 Replies
Nov 16, 2010
I have something like this
[code]....
it works fine, but I need to create a user object by passing Guid like this
MembershipUser user = Membership.GetUser(new Guid(userId));
what may be the cause. it woks fine from C# code behind.
View 1 Replies
Nov 18, 2010
how to auto login the user like in facebook.
what i mean that if the user ticks remember me then next time he will be auto logged in
View 1 Replies
Nov 29, 2010
I'm using ASP.NET 3.5 with IIS 7 with the URL Rewrite Module 2.0 installed.When I create the first test rewrite rule:
<rewrite>
<rules>
<rule name="Test rule1" patternSyntax="ExactMatch">
<match url="w/123/test" />
<action type="Rewrite" url="article.aspx?id=123" />
</rule>
</rules>
</rewrite>
(http://www.myapp.com/w/123/test ->
http://www.myapp.com/article.aspx?id=123).
View 1 Replies
Feb 9, 2010
I have an asp.net web app that uses forms-based authentication, a SqlMembershipProvider (using an encrypted password format), and a SqlRoleProvider. I need to know if it's possible to administer the users (create new users, assign them to roles, etc.) from a windows application - the powers that be don't want any administrative functionality in the web app itself.
Here is the membership provider definition from web.config:
[code]....
So, obviously, I have a Sql Server database that contains the users and roles for the web app. I'd like to create a separate windows app that references the web app assembly, and use the configured MembershipProvider, RoleProvider, and machineKey to create users, assign users to roles, etc. If that's not possible, I can duplicate the configuration settings from web.config within the windows app. But I don't know how to do this either.
View 3 Replies
Dec 6, 2010
[Code]....
after successful creation of 3 users on my web site now cannot create users
View 9 Replies
Mar 24, 2010
I need to send emails based on users input time and day (based on their time zone)? Kind of a reminder.
For Example: User input 2:00pm Eastern Time on my server I have different time zone, how to calculate the time and send the email at users time-zone. Its a web application. What is the best way to accomplish it using asp.net c#? If somebody already done it in the past I will be glad to take a look at source code.
View 1 Replies
Jan 7, 2011
i am using MSSQL Server 2005 with VB in my codebehind. I have an application that I have written as a time tracking system that uses SQL Membership provider to secure the site with forms authentication. I want to add additional functionality to the site. My company has a intranet SharePoint site. I want to add something on the front page of the SharePoint site that will allow the users to clock-in/out without having to login to the application. I have a users table that is not part of the SQL Membership Provider that holds detailed information about the employees. There is a column in that table that identifies users as being able to use the clock-in system. I want to be able to display a clock-in/out button on the paged based on that column. Not all users have the ability to clock-in as their time does not need to be tracked.
View 3 Replies
Oct 12, 2010
We have implemented the ASP membership and roles..and we would like to display the users currently logged in and also display the number of users online so we can display that on the page. The list of users woudl only be available to our admins. BUt the number of users will show for everyone.
View 9 Replies
Jan 28, 2010
I am just planning to create a blog type of web application. But i am not understanding how do i rewrite url's? say suppose site is xyz.com then when some user registers with name of T then he can visit blog at T.xyz.com? As you can see the url's will keep on changing dynamically.
I don't want to keep creating sub domains for each new user joined on the site. How can i achieve this?
View 1 Replies
Apr 18, 2010
I have a page for a client that currently is setup to display a gridview for each subcategory. They recently added a new subcategory and they were wondering why it wasnt showing up on the page. Well the way i have it setup, i have to create the gridview adn datasource for the new subcategory.
Is there a way to setup the page to display a gridview view for each subcategory so if they decide to add another, i dont have to update the page with a new gridview adn configure it? I would like to be able to update what i have and provide a more flexible setup for them.
keeping i mind that each gridview would contain different result sets, is this possible? if so, what controls would i use?
View 3 Replies
Mar 26, 2010
which i added one sitemap in whcih i added all the pages n i want to retrive that sitemap in masterpage based on login in whcih suppose admin hs login then display only admin pages with sitemap n if normal user hs login then it ll display only normal user pages with sitemap. here i didn't use login control but i create login page manually.
View 1 Replies
Jan 24, 2011
How could users in a "customer" role be retrieved from a MembershipUserCollection?
View 3 Replies
Jun 16, 2013
How to create dynamic page in asp.net c#? in this task ... user when click on create page button. he write name of page . and simple click create page.
View 1 Replies
Feb 22, 2011
Is there any built in way to get a users email address based on their username in ASP.NET 4.0? Or do I have to query the necessery tables?
I'm using this to get the logged in user:
string username = HttpContext.Current.User.Identity.Name.ToString();
Is there similar functionality to get the currently logged in users email from the database?
View 1 Replies
May 7, 2010
I have a page, called foo.aspx and i d like to rewrite the url as bar.somethingHow to do this? How does url rewrite happens in asp.netShould i create a generic handler?or should i get some url rewrite modules and add to app?
View 3 Replies
Feb 19, 2013
I have create new site and don't know how to rewrite 404 page
View 1 Replies