473,651 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

user login control

57 New Member
hi friends:-

I wann to make a login user control. i m using asp.net2.0 with c#. now help me to create this. its behave like a control factory....it means.. i make a contol of login...where ever i wann to use....login conrtol just drag and drop this control to the web page and its run. so if any one have any idea that how i make plz help me..its urgent to me...

thnx
Aug 9 '07 #1
5 1371
urvshah
2 New Member
you can use master page for the same or use provider facility given by .NET 2.0. If you use <provider> tag then you can use <asp:Login> control. and make it avialble to you.
Aug 9 '07 #2
neoupadhyay
57 New Member
sir, i think u dnt get my point....i wann to make a login user control in asp.net2.0 with c#, now its availabe to all where ever i wann touse, just drag and drop this control and it will run.

thnx
Aug 9 '07 #3
neoupadhyay
57 New Member
hello all

....i wann to make a login user control in asp.net2.0 with c#, now its availabe to all where ever i wann to use, just drag and drop this control and it will run.

thnx
Aug 9 '07 #4
RedSon
5,000 Recognized Expert Expert
hello all

....i wann to make a login user control in asp.net2.0 with c#, now its availabe to all where ever i wann to use, just drag and drop this control and it will run.

thnx
Why did you double post your question? Did you not read the Posting Guidelines?
Aug 9 '07 #5
suriya1986
1 New Member
drag and drop the login control in your aspx page and include the following code


protected void Login1_Authenti cate(object sender, AuthenticateEve ntArgs e)
{
try
{
query = "select * from Registration where UserId='" + Login1.UserName + "' and Password='" + Login1.Password + "'";
cmd = new SqlCommand(quer y, con);
con.Open();
dr = cmd.ExecuteRead er();

while (dr.Read())
{

if (dr["UserId"].ToString() == Login1.UserName && dr["Password"].ToString() == Login1.Password )
{
Server.Transfer ("Welcome.aspx" );
}

}
}
catch (Exception ex)
{
lblmsg.Text = ex.Message;
}
}

This is the procedure to use Login Control
Aug 24 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3013
by: Martine | last post by:
Hi there! I have a problem with programmatically adding user controls to my mobile webforms. If I load my usercontrol programmatically (in the Page_Load), the object is instantiated, I have access to the methods and properties from the Page_Load, no problem there. But as soon as I want access to the user control from another procedure on the same page, I get the next error message: "Object reference not set to an instance of an...
0
1407
by: Tim T | last post by:
Hi, I have a web application that has a number of users who administer their own data... i have several pages that check to see if a valid userID session exists, and if not, send them to a Login.aspx page (where a userID session is generated upon successful login). my pages are user specific, so each page will load data specific to that user (hence the need to maintain a userID). if users attempt to hit a page that requires a userID,...
4
3308
by: Michael | last post by:
Thank you for any help you can provide. This is what I have: index.aspx - contains nothing but a form with runat = server header.ascx - contains asp image box welcome.ascx - contains text footer.ascx - contains text login.ascx - contains asp/web labels and text boxes. The index page is simply a container for all the user controls. The
1
3585
by: moondaddy | last post by:
I need to replace a user control on a page with a different user control. The challenge I'm faced with is that this call is being made from the user control being replaced. Normally I replace one user control with another user control like this 'Using vb.net 1.1 ctl = LoadControl(ctlPath) Me.cellControlHolder.Controls.Clear() Me.cellControlHolder.Controls.Add(ctl)
7
3187
by: Samuel | last post by:
Hi, I am building a page that makes use of user control as a templating technique. The following is that I have in mind and it is actually working: Root/ -- login.aspx -- login.aspx.vb -- UC/ ----- Classic/
0
1683
by: clintonG | last post by:
I applied aspnet_regsql to SQL2K which was working fine throughout Beta 2 development. After installing Visual Studio and SQL Express RTM my application has blown up. Logging in to the application became realllllllllllly slow. Content in LoginView Role Groups was not displaying even after a user in a role had logged in. It was taking about 15 seconds or so for the login control to display when the login link was selected on the homepage....
0
959
by: Mad Scientist Jr | last post by:
my login user control has this public property, passed from the calling page: Public TableContent As Table is this byref? if not how can it be made so? when the user logs in, the user control calls a content object to show or hide rows in TableContent
13
6216
by: Michael | last post by:
I have setup a public variable in the Master Page "code-behind-file". Now I would like to set that value from the UserControl, but I can't seem to find a way to do this. Does anyone have any ideas? I'm basically trying to set it up so that I can keep the User infor (userid, ect) in the Masterpage so that other pages can access it. Thanks for any ideas. Michael
3
4333
by: =?Utf-8?B?RHVrZSAoQU4yNDcp?= | last post by:
The majority of pages on our site need authentication (forms auth against the aspnetdb database). I created an '~/auth' folder with its own config file forcing authentication for any pages in the folder. The default.aspx sits in the root folder and just does a Response.Redirect to an ~/auth/home.aspx page. The config forces authentication, which is carried out by ~/pub/login.aspx which has a standard asp:login control. I set up the...
12
3056
by: tvnaidu | last post by:
I have Two kinds of web pagess, one is for control page for only admin login, another one is to view status for user login. initially both html files can view with 192.168.0.10/control.htm and other file is 192.168.0.10/status.htm. I searched on Internet and I got some login code. this login comes when I give 192.168.0.10, then I gets login page, I can login with admin/admin, also I can login with user/user, once login, the corresponding page...
0
8352
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8802
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8465
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8579
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7297
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.