.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Login controls not working in VS2008

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net


I am creating a asp.net 3.5 app using VS2008 on a Vista Ultimate machine. I wanted to add the login features using the login controls. I was able to create users and roles without any problem using the web admin tool that comes with VS. But when I try to login using the same credentials I am always getting "Your login attempt was not successful. Please try again." error message. I am using MS Sqlserver 2008 as the backend. I am not using any .mdf or sqlexpress databases. I even deletd the App_Data folder. In sqlprofiler, I see the web admin tool is connecting, but when I try to login using the login control, it doesn't even show up on the sql profiler. I tried to launch VS 2008 as an admin, still no success. I tried to browse with IE or FireFox. The dev site is not hosted on IIS yet, and it is running on the dev server that comes with VS 2008. I have squandered nearly one week on this issue. Ironically I was able to to create a website last year with these same controls on VS2005 and Windows XP professional, and the site is running like a charm!

The following is the entry in my web.config file:

<membership defaultProvider="SqlMembershipProvider1"

View Complete Post

More Related Resource Links

Working with DropDownList and ListBox Controls in ASP.NET

"In my application i am using dropdownlist to display all categories from a table. When the user clicks this control I display all records in that category. Category table also contains column called color.

I wanted display some categories in dropdown list different color and others in different color using ASP.NET."-Anonymous

Login control not working in IE7


I spent the last few weeks getting a client site up and running, but all the while I was doing all my testing with Firefox.

I tried seeing what it would look like in IE7, and everything is great.  Except that I cannot login with it.

 I do not know for the life of me why.

Any ideas?

 I am using VWD 2008 and i have a 3.5 web.


Working with datepicker and input controls


Helloe all,

Please I'm developing a hotel reservation system and I have both "check in" and "check out" html "input"controls and I have linked these controls to the Jquery datepicker. Unfortunately, I'm not able to access the value of the controls in asp code behind (using their ids CheckInDate and CheckOutDate respectively).

Previously, I used asp textboxes and I was able to access the IDs in code behind but whenever the page displays and I click in any of the textboxes their respective datepicker don't show.

However, I'm able to access the html input controls in code behind when I add runat="server" but when I do that the datepicker don't show for both control when I click in the input boxes.

Someone help me so that I will be able to make the datepicker show as well as fetching/accessing the value of the input boxes (selected dates) in the code behind...... or how to use asp controls and add onclick functions to call the datepicker.

Thank you.


<script type="text/javascript">
        $(function() {       
        $("#CheckInDate").datepicker({ minDate: 0, maxDate: '+1M' });

Login control - Controls do not exist in current context

Hi all,Trying to set up the Login control as a User control, but none of the controls exist in the current context?None of my code below is recognised? What's going on here please? I've rebuilt the solution many times.if (Membership.ValidateUser(this.UserName.Text, this.Password.Text))        {            FormsAuthentication.RedirectFromLoginPage(UserName.Text, RememberMe.Checked);        }        else        {             Msg.Text = "Login failed. Please check your user name and password and try again.";        }

"Remember Me Next Time" under Login Control is not working

I am using VS 2005 and created a Login control. Login control provides "Remember Me Next Time" check box, I check this box but it does not remember next time. I have following entry in the web.config file <authentication mode="Forms"> <forms name=".MyCookies" loginUrl="login.aspx" protection="All" timeout="5000000" cookieless="UseCookies" slidingExpiration="true" path="\"></forms> </authentication> What am I missing? Thanks

VS2008 and C#: How to create PictureBox controls programmatically in a FlowLayoutPanel ?

I am trying to create multiple PictureBox controls in a FlowLayoutPanel programmatically. The number of the PictureBox controls is dynamic depending on the target image folder. My current approach results a compilation error:             // (Works !)             pictureBox1 = new System.Windows.Forms.PictureBox();             pictureBox1.Width = 150;             pictureBox1.Height = 150;             flowLayoutPanel.Controls.Add(pictureBox1);             string sFileFullName = "Resources\\file1.bmp";             pictureBox1.Image = Image.FromFile(@sFileFullName);             // (Error !)             string pbName = "pictureBox";             for (int i = 0; i < 100; i++)             {             

Client side hashing using ASP.NET Login Controls

I am using ASP.NET 3.5 and SQL Server 2005.currently while creating users, the password will be stored in the database using SHA256 algorithm. And in the Log In time entered password will be hashed with a salt and this salted password only transmitted through network (javascript). This is for incresing security without using SSL connection.I am planning to use ASP.NET 3.5 login controlsHow can I use client side hashing (SHA256 salted hashing) along with ASP.NET Login Controls. And also each login attempt should be logged, in a separate database table with IP address, user agent and so on.Any help would be greatly appreciated.

WPF Designer not displaying controls in the toolbox VS2008 Prof Edn running on Windows 7

My Version Microsoft Visual Studio 2008 Version 9.0.30729.4462 QFE Microsoft .NET Framework Version 3.5 SP1 I have windows 7 home premium running on my machine I installed Visual C# 2008 Express Edn with SP1 first I got that running I then installed rest of the Express components including SQL. I then installed Visual Studio 2008 Prof Edn with .Net 3.5 SP1 I then installed .Net 4.0 I run two instance of  C# IDEs. The Pro End and the Express Edn. Both Express/Prof C# versions display controls in toolbox for Windows Forms correctly. I only have problems with controls in toolbox for WPF in VS 2008 Prof Edn. My Scenario : When I use Express Edition the design view of the WPF Designer, it displays the toolbox with controls populated for WPF that I can use. When I use Pro Edition the design view of the WPF Designer, it displays the toolbox with  NO controls visible for WPF  that I can use.  The toolbox has only  "general" tab with the words "not usable controls....". If I do a show all it does show controls but they are disabled/read only. When I look at the Tools -> Choose Toolbox Item , I get the tools dialog box. Inside the box within the WPF Components TAB all controls are not ticked/selected. If I tick the Button Control and select OK, the control does not appear on the toolbox. I have done reset Toolbox no change. I

login controls

hi i want to know about login view control that how can i use this control without using asp.net configuration by coding only

Membership login not working



I am developing a website in which giving login functionality through membership and asp.net login control.My membership login was working fine but now its not working.

I m checking authentication through HttpContext.Current.User.Identity.IsAuthenticated but it always return false.

And when checking through Membership.ValidateUser(Login1.UserName, Login1.Password) it gets authenticated..

why this is happening.........

plz help........

Multiple issues with dropdown list controls not working correctly


I am using WSS 3.0 and SharePoint Designer.  I have modified one of the items in my NewForm page so that I have a filtered lookup using a spdatasource. The filter works great, but my issue is that I can't seem to save the users selection back to the list itself.

Issue when using an ASP.NET dropdown list
I am able to bind the filtered spdatasource to an ASP.NET dropdown list control, however the item that is selected in the dropdown list is not being saved back to the list.  I am guessing that this is because the dropdown list itself is not tied directly to the appropriate list item, but... I can't seem to figure out how or where to do this.  I don't see anything in the data properties box in SharePoint Designer that allows me to tie the data back to the list itself.  Maybe I am just overlooking it somewhere?

Issue when using the native SharePoint Data View DropDownList with a filtered spdatasource
When I select "Data Fields..." on the dropdown control I get the Change Data Bindings dialog box.  From here I can select a data field to save the value back to (which resolves the issue noted for the asp.net control) and I can select my spdatasource, but... the display text and value fields below that never populate.  Thus, the dropdown list is empty when the user is filling ou

AJAX Controls not working....


I have a simple under construction page that I am working on for my company website and I am trying to apply the rounded corners extender to a panel at the top of the page for my title.  But when I put the extender on the page and set it up for the panel that holds my title and then view the page in my development environment I get a blank page.  When the page first loads you can see the title panel flash and it disappears.  Below is my code...

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

My user controls stopped working in Design mode! Why?


I have a few user controls that I have been using for months but now whenever I open a page in Blend that uses one of the controls I get an invalid xaml error. The project still compiles and runs and behaves just like it's supposed to but I can't edit xaml in Design view because of this error.


In the page I have

<local:ACAVariableWidth x:Name="CIDCloseButton" HorizontalAlignment="Right" Margin="0,0,17.54,15" VerticalAlignment="Bottom" Width="174" Height="89" MouseLeftButtonDown="callerID_close" Text="Close"/>

The error is: The member "Text" is not recognized or is not accessible

In the user control xaml I have:

		<StackPanel x:Name="TopSP" Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center" Height="76" d:IsLocked="True">
			<TextBlock x:Name="ACATB" Margin="8,8,8.5,9.5" FontFamily="APHont" FontSize="32" Padding="5,0" Foreground="White" TextAlignment="Center" VerticalAlignment="Center" Text="{Binding ElementName=UserControl, Path=Text}" d:IsLocked="True">
					<DropShadowEffect Direction=&

AspNet Membership Login Stoped Working !!!


Hello all

I have a web app that uses the Membership Provider to authenticate users.

Everything worked fine until today... when I tryed to log in it failed.

I looked in the database if something went wrong there and the user is deleted but everything looks fine there.

I tryed to recover the password using the user name and i got an error that the user is not recognized.

I tyed to recover the password (even though I am sure what the password is) but still no luck... (I get an error that hased passwords can not be decrypted)

I triyed it in local host and guess what ... still the same...

this is the provider section in my web config

    <membership defaultProvider="SqlMemberShipProvider">
        <remove name="SqlMemberShipProvider"/>
        <add name="SqlMemberShipProvider" 

Any i

Having multiple UpdateProgress controls working


I have an application that is using TabContainers and TabPanels. Within each TabPanel I have a DropDownList and a GridView. The GridView is filled on "SelectedIndexChanged" event.

I have managed to get UpdatePanel and UpdateProgress working for one on the instances but I do not seem to have luck implementing additional UpdateProgress controls for the rest on the application.

I have tried to use "AssociatedUpdatePanelId" but read that external trigger will not work. I've also tried to assign each UpdateProgress value of UpdatePanel in code behind (

UpdateProgress1.AssociatedUpdatePanelID = UpdatePanel1.UniqueID)

 , not working for me either:

I have created a Java SCript that hides GridView when UpdateProgress is being shown (works fine too)

This is what I have (and working):



<script type="text/javascript">
      window.onload = function() {
          var prm = Sys.WebForms.PageRequestManager.getInstance();
          if (prm != null) {
              prm.add_beginRequest(function(sender, e) {
                  var gridView = document.getElementById("<%=GridView2.ClientID %>");
                  if (gridVi

Paging not working with two controls- Dropdownlist & Listview


So I am using EW + Access database to create a page.

This page contains two controls. First control is Dropdownlist which databinds with second control Listview.

This listview has paging on becuse of multiple pages. If I don't use QueryStringField paging works but if I use QueryStringField paging doesn't work and it goes back to first option of Dropdownlist.

I need paging to access specific records.

Can anybody help me with this issue.

Thx in advance!!

Login controls and custom membership provider


I am working on implementing a custom membership provider that works against an existing schema in my database and have a few thoughts/question.

The login control will automatically call the ValidateUser method of the membership provider, so no matter how I implement the provider the only thing the login control cares about the bool value returned by this method.  What I am confused about is there could be numerous reasons why a login attempt failed; user is locked out, too many tries in a period of time, etc.  There is no way that I see to convey that to the control so it could display the proper message.  Other properties of the membership provider such as PasswordStrengthRegularExpression have absolutely no effect on the login control as well (out of the box), I would have hoped that it would automatically somehow translate into regular expression validators, but that doesn't seem to be the case.  So it seems that I need to initialize the login control properties with these settings out of the provider configuration if I want them to take on the control itself.

If the only thing that the Login control does out of the box (without manually handling events and doing the initialization as described above) is call the ValidateUser method on the membership provider, I see no way to convey back to the Login control why the validation

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend