Asp.net - Redirecting Admin To Admin Page And User To User's Page?

Nov 9, 2011

i'm having some problem over here. When user enter their id,it will show up the main page and its for user but when admin enter their id,it will enter the user's main page and i have to click admin site on the top hyperlink and it automatically logout and once i enter back admin passwrd and then only it redirect to admin page.how to make it like once user enter their passwrd it redirect to user page and once admin enter admin password in the login it redirect to admin ?I have 3 roles over here which are admin,staff and user. Hereby i'll provide you my aspx code and also my vb code which is running behind the program.p

ASPX
<asp:Login ID="Login1" runat="server" BackColor="#009933" BorderColor="Red"
BorderPadding="4" BorderStyle="Ridge" BorderWidth="1px" Font-Names="Verdana"

[Code].....

View 2 Replies


ADVERTISEMENT

Asp.net - Auto-redirect On Login Link Click To Admin Page If User Already Logged In

Apr 9, 2011

i have a login page link above the page /// i want if user already loggedin then anybody click on loginlink then the user will automatically redirect to default.aspx ..

View 3 Replies

Redirecting To Login Page If User Enters Root Path?

Jun 17, 2011

I've got a VB.net web app, and its start page is http:\<myServer> myApp>webformslogin.aspx

I'd rather they didn't have to enter this whole address. Is there a simple way to redirect my users to this page if they just enter the root i.e. http:\<myServer><myApp> ?

View 2 Replies

Stop Redirect Page In Asp Web Admin Tool?

Nov 14, 2007

I am using the ASP 2.0 Web admin tool to authenticate users using forms. I can deny a user other than admin from viewing my maintenance folder using the code below. However, if a user is denied access it throws you back to the login page. Is it possible to show an 'access denied' message or at least simply do nothing?

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<authorization>

[Code]...

View 2 Replies

Add User Level's Like Admin And Normal User?

Jan 29, 2011

how to add user level's like admin and normal user

i have this table login with the gebruikersnaam paswoord admin (admin is a int and if its 1 then your a admin)

this is my login script

Dim cnn As New SqlClient.SqlConnection
Dim comand As New SqlClient.SqlCommand
Dim adapt As New SqlClient.SqlDataAdapter

[Code]....

View 4 Replies

Allow Admin And Customer To Login In At Same Place But Direct To Other Page After Click Button?

Dec 28, 2011

i have 2 textbox for name and password and a buttonthere 2 table, one admin and one customerafter i enter the customer name and password , it verify whether empty or incorrect password , if correct it will go to the customer pagehowever if i enter admin name and password and after verify it should go to the admin pagei am only able to allow use one table for the login ? so how should i change the code below?

Protected Sub btnLogin_Click(sender As Object, e As EventArgs) Handles btnLogin.Click
If String.IsNullOrEmpty(txtName.Text) Or String.IsNullOrEmpty(txtPassword.Text) Then
Failure.Text = "Invalid User Name and Password. Try Again."

[code]....

View 1 Replies

Deployment - Installed By Admin, Won't Run For User

Nov 16, 2009

I think this has to do with a third party OCX control. Below is the output when the application starts. When I install my application on a stand-alone PC or most PCs in a networked environment it runs fine. When I go to some offices that have very tightly controlled networks I have problems.

The set up won't run under the user name so someone from IT must log in as administrator. They run the set up and the application installs and runs fine. The IT person logs off and the user tries to run it and the application won't even start. An error box appears and below is the report. SCANNERLib.DLL is the third party control. Maybe there is something I'm missing when I compile. Maybe the DLL registering funny under the Admin rights. [Code]

View 2 Replies

Detect If User Has Admin Privileges?

Jan 31, 2010

I found that snippet, edited it a little bit and now im trying to use it...the problem that ocurres, is that its never going into the first IF... so already there seems to be an error.Im working on XP SP3 with admin privileges..

Private Shared Function GetCurrentPrivileges() As Privileges
If My.User.IsAuthenticated() Then
If My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) Then

[code]......

View 7 Replies

VS 2010 - Database Has Been Placed In A State By User (Admin)

May 23, 2012

Error: The database has been placed in a state by user 'UserName' on machine 'ComputerName' that prevents it from being opened or locked.

View 5 Replies

VS 2010 Way To Make Like 'admin' Form Where New Account Applies Will Pop-up When 'admin' Log In And Then Either Accept / Reject New Users?

Oct 10, 2010

i have a script with a login form that creates a folder per user with username.txt, password.txt, firstname.txt, and lastname.txt. - auto creates when creating new user.after i log in and change form i want an label showing the first and last name of the person logged in,how am i supposed to do that? is there any way to make like an "admin" form where new account applies will pop-up when "admin" log in and then either accept or reject new users?

View 8 Replies

Checkif Admin Or User Hard Code Mysql

Jan 20, 2009

I'm creating a program that users will login to and I'm trying to make different user levels. I have the login and registration part done. But i need the user levels part. I know i can use a billion if then statements for each admin i have but that will be thousands lines of code afterwards. So I thought up maybe i can check the column name admin and see if its set to true. Or even check another table to see if the user is in that table then load a different form.

Dim conn As MySqlConnection
'connect to DB
conn = New MySqlConnection()

[CODE].................

Also I'm using Visual Studio 2008 express and was wondering if this would work also even though its for 2005 Do to I see the flaw in hard coding it into the program. Any hacker who de .exe it can get a hold of my information and use it against me. And if not how would i go about in 2008 and use it. [URL]

View 2 Replies

Make Admin Confirm What A User Enters In Application

May 2, 2012

Just a pretty question that seem to me a bit difficult to do it. Well, I have a form called customers. Login form and mainform. So my clients want to have an option that explains this: If a user enters information in the customer form, then that information has to be confirmed by admins panel.

[Code]...

View 3 Replies

Admin On Vista Doesn't Show As Admin Class?

Jun 9, 2009

on XP Pro, IsUserRole(eUserType.Administrator) returns true, if the class is administrator, and false if it's limited...

On Vista, it returns true, if it's the first administrator account, and false for anything else... I created a second administrator account on Vista, and it shows in code as "Standard" (or limited) user, the same as if I made a "Managed Account" on Vista...

My
#Region " [IsUserRole] "
Public Enum eUserType
Administrator = 0

[Code].....

View 7 Replies

Unable To Use 2 Different Login Authorities Which Are Admin And Non-Admin

Mar 11, 2010

I'm designing a system, whereby am unable to use 2 different login authorities, which are Admin and Non-Admin. I am using VB.NET and Ms. Access and need help for the codes.I want something like, if i click on admin/non admin (with different passwords) a dialog box pops onto the screen and asks for the password. If the password is correct it should take me to the form i want. Something of this sort please.

View 9 Replies

Asp.net - Set Master Page On Page Preinit Based On Custom User Control Method Result?

Apr 27, 2011

I have a user control that checks if a certain query string and session value are present then returns a boolean based on that, if it's true I want to set the master page. The page is throwing an Object reference exception when it tries to call the method EditUser1.UserAuthorization(). Why is this happening? I imagine that the method doesn't exist at that point in the stack. Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit

[Code]...

View 1 Replies

Access A Page Variable From User Control Placed On That Page From VB?

Dec 27, 2009

I want to access a page variable from a user control placed on that page. All the solutions work in C# via casting to the page class. The problem is that this doesn't work in VB. The page class is not selectable from the Intellisense dialog. Manual typing results in the error type not defined. It is strange that C# can do this without a problem. What is the proper solution for this in VB? I had other cases where I needed to access a control on the main page. C# again uses a cast to the page class to access the control. This doesn't work in VB again. So how can I access the page class from a user control in generell?

View 5 Replies

Use IsolatedStorage - Once The User Types Out A Note On The Add Notes Page, The Title Of That Note Appears On The Main Page?

Mar 7, 2012

I want to create a notes app for Windows Phone 7 using Visual Basic.I have read a few tutorials but they are all suited for C# not VB. Basically, I have a main page and a page to add notes. Once the user types out a note on the add notes page, the title of that note appears on the main page. I also want the user to be able to select that title and it will display the note. I have done a bit of research and I know I will need to use isolated storage (not sure how to implement it in VB) to save the notes. I think I will also need a list box that will store the title of the notes.

View 2 Replies

Create User Page And A Log In Page?

Mar 28, 2010

Im Trying to Set up a Create User page and a Log in page. both pages are on a different Form in Visual Basic so far i have;

Code:
Imports System.IO
Public Class SecondForm

[code].....

View 6 Replies

Page Is Not Redirecting?

Apr 9, 2012

I'm having a problem with ASP.net redirectionThe Copy() method below is called from a javascript button in a grid with ajax and it works fine. It redirects to the Create action of the controller.

<AcceptVerbs(HttpVerbs.Post)> _
Sub Copy(ByVal noDemande As Integer)
Response.Redirect("/DemandeDeMontage/Create/" & noDemande)

[code]......

View 1 Replies

Page Not Redirecting Even Though It Does Not Error Out?

Mar 3, 2009

I have this function that utilizes jQuery's post feature to send an ajax request to my logout handler, which destroys the session (set by asp.net) and redirects to the login page:

<script type="text/javascript">
//<![CDATA[
function doLogout() {

[code].....

View 2 Replies

Redirecting To A Specified Page In A Gridview In Asp.net

Feb 5, 2010

In my application I have a gridview in which details of containers are stored and displyed.There are many containers in this gridview, say more than 150 containers. I have implemented paging for this gridview as it contains many record. But its difficult for the user to go to every page and search one particular container. So i want a serach option for this.What I need is to enter a containernumber in a textbox and when I click a button, it should redirect to that particular page in the gridview where that particular containernumber exists.

View 2 Replies

Find And Interact With A User Control On Page From Separate User Control?

Oct 17, 2011

I have an aspx page that has two different user controls. I want to find user control A and be able to set properties, etc., from user control B.

I was thinking I could do something like this:

Dim CMFilters As Control = Me.Parent.FindControl("CMFilters")

...but that doesnt work to be able to set properties and call methods. I somehow need to get the user control and and declare it as that user control type.

View 2 Replies

Cancel Button Not Redirecting To Separate Page

Apr 30, 2011

I have an ASP.NET form with a cancel button that is supposed to, after confirmation from the user, redirect them to another page. I'm using javascript for this. It works fine in a simple HTML page, but apparently something is interfering with it on the .aspx page. The popup message works perfectly, but clicking "Okay" does not take you to another page. I have tested the if statement and it is working correctly, the only thing it won't do is leave the current page. [code]...

View 1 Replies

Sending Array - Redirecting Page To Next DataSet

Jan 29, 2010

I'm using javascript to send a array to my code behind so it can be saved. And also to redirecting the page to the next dataset.
function ChangeMonth(utcDate){
PageMethods.javaGetArray(colors);
alert("saving...");
window.location = "./transport.aspx?date=" + utcDate;
}
This works perfectly when there's an alert in between, the saving and the redirect. If I delete the alert it just redirects without saving.

View 1 Replies

C# - Redirecting To The Previously Browsed Web Page After Session Expires?

Feb 22, 2012

I'm developing web site using asp.net. In my web site after login i set session for the logged user for my web site need. and on each page i checked whether that session is null or having value and depending on the value i redirected to the login page.My issue is that after login i want to redirect to the previously browsed web page and i done it by using following way-code on the particular page for checking session value-

if (Session["EmployeeID"] != null)
{
}
else

[code]....

View 4 Replies

Error While Redirecting To Another Page-Confirm Form Resubmission

Mar 16, 2009

I have a page named a.aspx and clicking on the submit button i redirected to b.aspx with one parameter named fileid.

On clicking on back button from b.aspx i have to go to a.aspx.But now on clicking back button, i got one error as follows[code]....

View 1 Replies

Asp.net - Redirection To User Page Not Happening?

Dec 14, 2011

I am using simulator account with server_asp.net-kit. When I am running the application I reach the Ready to Send the Notfication POST page.

But from here I don't know how to redirect. I have tried:

RedirectURL=" & strYourSiteFQDN & strVirtualDir & "/PaymentConfimationPage.aspx?reasonCode=002" & vbCrLf
in notificationPage.aspx page.

Do I need to use this page? How to redirect? Code I have is in VB whether C# code available?

View 1 Replies

C# - Make User Come Back To The Same Page After Login?

Oct 7, 2011

In asp.net 3.5, i am trying to send a user to a different https url to login, if the user is not logged in. I am kinda' restricting the user not to see the forum page in the current site (http://thisSite.com/forum.aspx), if the user is not logged in.I am not sure how to redirect the user back from the login page [url] back to the [url]

i tried placing response.redirect in my forum.aspx like this: response.redirect("https://somethirdpartysite.com"), but it's not behaving as expected.

View 1 Replies

C# - Using A User Control In A Base Page Class

May 21, 2009

I have a base page class that inherits from Page. We'll call it SpiffyPage. I also have a user control called SpiffyControl. I then have an aspx page, ViewSpiffyStuff.aspx, that inherits from SpiffyPage. On page load, the SpiffyPage class is supposed to inject a SpiffyControl into the aspx page. The problem is that SpiffyControl is a user control, and to instantiate that in the code behind one has to access the ASP namespace, sort of like: ASP.controls_spiffycontrol_aspx MyControl;

But SpiffyPage isn't an aspx page, it's just a base page, and as such I can't access the ASP namespace, and I therefore can't instantiate a SpiffyControl in order to inject it. How can I achieve my goal?

Edit: One important point is that I must have a reference to the actual control type so I can assign values to certain custom Properties. That's why a function like LoadControl, which returns type Control, won't work in this case.

View 11 Replies

Creating A User Favorites Section On A Page

May 13, 2009

I'm just starting to learn vb.net and have never worked with cookies. I'm wondering if I can store an array of name value pairs in a cookie, so they can be retrieved by index number. I'm not really even sure if that's the best way to handle the issue. I basically want to have three things: an 'add/delete' page that has a text box for creating new favorites, along with a list of their current favorites, with the ability to individual delete favorites from the list.be able to display their existing favorites from the cookie on a separate page and a button I can put on all my pages for 'add this to favorites'I don't mind doing the research, of course, but really need direction on what will be required. Having never worked with cookies, I don't really know the limitations.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved