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


Post New Web Links

LoginName Control Not Working

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

Hi there,

I have a bizarre problem with the LoginName control, which has worked before, but is now displaying some strange behaviour.

I'm using the MySqlMembershipProvider, and everything else seems to work apart from this.  In order to get this to work I always have to delete the user (me) from the MySql database and re-register on the website.  I've got a very simple login control below:


<%@ Control Language="VB" %>
<%@ Import Namespace="MySql.Web" %>


<script runat="server">

	Sub Login_Click(obj as object, e as eventargs)
		If Membership.ValidateUser(tbUsername.Text, tbPassword.Text) Then
			Session("Username") = tbUsername.Text
			LoginForm1.Visible = False
			LoggedIn.Visible = True
		End If
	End Sub


</script>



<asp:Panel id="LoginForm1" runat="server">

	<table>
    <tr>
    <td align="left"><strong>Username:</strong></td>
    <td align="right"><asp:TextBox id="tbUsername" runat="server" /></td>
    </tr>
    <tr>
    <td align="left"><strong>Password:</strong></td>
    <td align="right"><asp:TextBox id="tbPassword" runat="s


View Complete Post


More Related Resource Links

Server side validation of Fileupload control not working

  
 

 


I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.


Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate
       

' Get file name

        Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload)

        Dim UploadFileName As String = uploadAvatar.PostedFile.FileName

        If UploadFileName = "" Then
            ' There is no file selected
            args.IsValid = False
        Else
            Dim Extension As String = UploadFileName.Substring(UploadFileName.L

Localization not working in class library (composite control)

  

Hi

I have a class library called WEM.portal which used Resource files to localise text in my composite controls.

I store my resource files (eg MyResourceFile1.resx) in App_GlobalResources folder and then refer to them using

MyLabel1.text = My.Resources.MyResourceFile1.MyResourceKey1

This is all working ok until I create seperate files for each language such as MyResourceFile1.FR-fr.resx.

I have implemented this throughout my other web applications but the Class Library doesnt seem to want to work the same way

When I load the page it correctly showes the resourced keys which I have done through the web application BUT the resource keys in the composite controls does not seem to pick up the culture code.

Am I missing something stupid. Ive tried

  • changing the Build Action on the resource file to Content and Custom tool to GlobalResourceProxyGenerator
  • Creating a resourceManager but to no avail



Snippet



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.

 Thanks.


"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

Drag drop functinality not working on Explore View control for file containing special characters in

  
We have created a control which uses explorer view control for file drag and drop. This functinality works fine for a file having filename without special characters but it gives an error if we drag and drop a file having special characters in the file name. The reason for this is Sharepoint uses WebDAV protocol for file transfer to the Sharepoint document library and WebDAV protocol has limitation that it does'nt accept file with special characters. Please let me know the way how I can accomplish drag and drop of file with special characters in file name, onto Explorer View control with WebDAV.

Masked Edit Control is not working

  
Hi,I'm using MaskedEditExtender for numeric field (i.e.%). In that field, user can enter the percent value between 1 and 100 and also decimals like 12.34.  Doing this, I have used this code which is not working.<ajaxToolKit:MaskedEditExtender ID="TestDetailsControl_maxTotalScoreMaskedEditExtender"runat="server" Enabled="True" ErrorTooltipEnabled="True" Mask="999.99"MaskType="Number" AutoComplete="true" AutoCompleteValue="" InputDirection="LeftToRight" TargetControlID="TestDetailsControl_maxTotalScoreTextBox">                                                   </ajaxToolKit:MaskedEditExtender>And validator code, <ajaxToolKit:MaskedEditValidator ID="TestDetailsControl_maxTotalScoreMaskedEditValidator"runat="server" ControlExtender="TestDetailsControl_maxTotalScoreMaskedEditExtender"ControlToValidate="TestDetailsControl_maxTotalScoreTextBox" IsValidEmpty="true"MaximumValue="100.00" InvalidValueMessage="Number is not valid" MaximumValueMessage=&qu

Drag drop functinality not working on Explore View control for file containing special characters in

  
We have created a control which uses explorer view control for file drag and drop. This functinality works fine for a file having filename without special characters but it gives an error if we drag and drop a file having special characters in the file name. The reason for this is Sharepoint uses WebDAV protocol for file transfer to the Sharepoint document library and WebDAV protocol has limitation that it does'nt accept file with special characters. Please let me know the way how I can accomplish drag and drop of file with special characters in file name, onto Explorer View control with WebDAV.

User Control Validation is not working properly

  
In my Website I have header control (header.ascx) and footer control (footer.ascx)In header.ascx one textbox and one button is there. Textbox meant for accepting search string.In footer.ascx one textbox and one button is there. Textbox meant for accepting Email-Id.Now in validation of header.ascx I had done blank checking by JavaScript. And in validation of footer.ascx  I had done blank-checking and e-mail checking by javascript.In both the control the textbox and the button both resides under Panel control whose DefaultButton property set to the respective button ids. So that if User write write something and press ENTER key from keyboard then it should do whatever respective Button_Clicks will do.Now My problem is suppose I place the mouse cursor in footer.ascx's textbox and press the ENTER key it validates properly but after that if I place the cursor inheader.ascx's textbox and press the ENTER then it is not working. Again If I do the opposite then also first one will fire but in case of second it is not firing .......

File Upload Control is not working in Update Panel

  
hi friend... i am using update panel... in one of my aspx page (ASP.NET 2.0)there is a file upload control in update panel which is used to upload company logo on server..when i remove the update panel.. than file upload is working properly..but when i again place an update panel then file upload control is not working and its giving me error.. in likeIf String.IsNullOrEmpty(fldLogo.PostedFile.FileName.ToString) Then                 as object reference not set to an instance of an object... can any body help me ?any idea ??  

Ajax AsyncFileUpload control not working in IE7.0 and IE8.0 browser in Integrated Windows Authentica

  

Hi, 

I am facing problem using Ajax AsyncFileUpload control in IE7.0 and IE8.0 browsers. 

It is working fine in local environment, when you deploy the code in Windows Server 2003 (IIS6.0) with Integrated Windows Authentication mode it is not working properly in IE7.0 and IE8.0 browsers. 

Issue: 

I am doing the validation in client side using OnClientUploadStarted, OnClientUploadComplete it is working fine but once click on any other button (server side) getting the error Internet Explorer cannot display the webpage (Diagnose Connection Problem) in IE7.0 and IE8.0 browser. Same thing is working fine in other browsers.

WPF- Back/Forward navigation UI not working when Html web files are displayed in Frame Control

  

I am integrating (web) html files in my WPF application using Frame (say Source=http://www.microsoft.com)

I set the JournalOwnership="OwnsJournal" and

NavigationUIVisibility="Visible".

The navigation UI is visible and disabled initially when the page loads up (which is fine), but when I click on links the Back/Forward button is not enabled.  Interestingly the context menu shows Back/Forward and I can navigate that way. Do you have pointers?

 

Thanks for your help.


ajax AsyncFileUpload control is not working with IE9

  

AsyncFileUpload  not working with IE9. only on capability mode


Visual Studio WebBrowser control's PrintPreviewDialog generates "VSHost32.exe has stopped working"

  

I'm getting a problem with a VS 2008 application when I use the WebBrowser control's .ShowPrintPreviewDialog method and either print or close the dialog box.  I'm working on a 64-bit Windows 7 computer and using Visual Studio's default Debug option settings.  The problem happens both when running from the IDE in debug mode and after compiling in x86 mode as a stand-alone.

The control is central to as an otherwise effective report management system, so on btnPrint_Click I assign HTML code to .DocumentText and then call .ShowPrintPreviewDialog, which works fine, other than it does need 2 clicks so it seems both stages have to happen as separate events? 

Although when I go to print, the document prints okay, the print preview dialog form closes itself and whole program crashes with the above message.  I've also tried separating those stages to avoid the 2-click issue, but I still get the crash.

If I turn Project>Properties>Debug>"Enable unmanaged code debugging" ON, I get this message instead "Unhandled exception at 0x752c77df (urlmon.dll) in PMPos.exe: 0xC0000005: Access violation reading location 0x00000001."

The control's other print dialog methods work fine.   Is there a solution that I can rely on when distributing the application or am I best abondoning this particular

v3.5 Ajax ToolkitScriptManager Extender Control not working in Nested Master Pages

  

I am using v3.0.31106.0 of the AjaxControlTookkit.dlll.  I have nested master pages.

The site Master page has the only ScriptManager & holds the oneColumn & twoColumn master pages.
The twoColumn master page holds content pages. In the content page there is a update panel.

Here is my Site Master Page:

<%@ Master Language="VB" CodeFile="SiteMasterPage.master.vb" Inherits="SiteMasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div><h2>Main Master Page</h2>
        <br /></div>
    <div>
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
        
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>
</html>


Here is the Nested Master Page:

Delegate Control not working

  

I have a question about delegate controls. I am trying to replace the search box. I have done the following - 

  1. Created a empty SP 2010 project with a control class. 
  2. Added a feature and elements.xml to the same project
  3. Deployed the feature and activated it (I can see it in my site list of features)
But my search box still appears to be the default one...what am I doing wrong?

My elements.xml is as follows - 
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Control
    Id="SmallSearchInputBox"
    Sequence="49"
    ControlClass="DelegateControl001Feature.ControlTemplates.DelegateControl001Feature.CustomSearchBox"
    ControlAssembly="DelegateControl001Feature, Version=1.0.0.0, Culture=neutral, PublicKeyToken=69948fee36b953cf"/>
</Elements>

And my ascx file just has a asp:TextBox with custom text in it.

I am assuming that no master file changes are necessary right?

ListViewByQuery control Context menu not working

  

I add a LIstViewByQuery control to a sharepoint application page and bind the control to a list. when I right click an item in "Name" column, it doesn't show the context menu, instead it pops ip a dialog and says" This item is no longer avaliable. It may have been deleted by another user. Click 'ok' to refresh the page"

Has anybody have the same problem? I'm using sharepoint 2010 RTM.

Thanks,

Greg

 


Custom checkbox control 'checked' property is not working .

  

Hello ,

 

Iam developing a custom checkbox control deriving from the 'compositecontrol' which i need to use it for a composite control purpose.

 

 

public class TngCheckBox : CompositeControl

{

i have written the required properties which are working fine except the "checked" property. he

Categories: 
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