studio NETSOULS

Applying Web To Your Business

The asp.net membership has the mechanism that it locks out a user's account if he/she tries to authenticate themselves with false password five times, by default, or within 10 minute window. The locked user can then not login.

In the MembershipUser class there is a public method UnlockUser() that you can call for any username to unlock the user, this will reset their LastLockOutdate field etc and allow the users to login using the same password. More...


At first glance, it should be easy to inject a javascript, but it took a little bit of digging around to figure out the resolution, the key is to use ScriptManager.

<asp:UpdatePanel ID="myUpdatePanel" UpdateMode="Conditional" runat="server">
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="btnClick" EventName="Click" />
    </Triggers>
    <ContentTemplate>
        <asp:ImageButton ID="btnClick" ImageUrl="ClickMe.png" runat="server" 
            CausesValidation="false" OnClick="btnClickEvent" ToolTip="Click Me" 
            AlternateText="Click me!" />
    </ContentTemplate>
</asp:UpdatePanel>

We wanted to dynamically inject some JavaScript code. If my ScriptManager control has EnablePartialRendering set to true, it's a simple matter of registering the script. What i didn't realize earlier was that you don't need to the use the current page or current event, you need to call the static method on the ScriptManager class. More...


I would like to set the a property value on a user control. It sounds easy enough. First, I would like to create a web control then I would like to access one of its properties "HasAccess" and set the value to "true".

In this example we are assuming that the web control is been called from a master page and the property that needs to be set is from a web page. In the web page we need to first find the user control and then set its property.

if (Master != null)   
{   
    Control ctlMyControl = Master.FindControl("ctlMyControl") 
        as Control;   
    if (ctlMyControl != null)   
    {   
        Type ucType = null;   
        ucType = ctlMyControl .GetType();   

        PropertyInfo hasAccess = ucType.GetProperty("HasAccess");  

        // Only set the first control as each on page 
        // will pass through code.   
        if (hasAccess.GetValue(ctlMyControl , null) == null)  
            hasAccess.SetValue(ctlMyControl , True, null);  
    }  
}

When you restore a Microsoft SQL Server database on a different machine, you cannot access the database until you fix the permissions.

The problem is that the user in the database is an "orphan". This means that there is no login id or password associated with the user. This is true even if there is a login id that matches the user, since there is a GUID (called a SID in Microsoft-speak) that has to match as well. More...


Recent Project Snapshots

  • Mary Kay - Make Over Contest
  • Utility Forms
  • Oncomed
  • Nutrition Vista
  • Forysth Barr - Letter Writer Application
  • Phase One Trials - Content Management System

About Us

studio NETSOULS is a complete IT services company, offering strategy, design, development and implementation of the total solution for your web and IT initiatives. The solutions we provide, enables businesses to leverage leading edge technology to gain sustainable competitive advantages in today's marketplace.

We specialize in designing, developing and deploying the next generation of IT solutions including e-business solutions Read more...

Month List