Archive

Archive for May, 2015

SQL Server Authentication enabling using Microsoft SQL Server Management Studio

Hi all,

try this scenario to Enable SQL Server Authentication using MS SQL Server Management Studio

1. First, Login to the SQL Server Management Studio using Windows Authentication. Right-click on the database instance, and go to Properties.

SQL2

2. Then on Properties page, click on Security and select SQL Server and Windows Authentication mode, and click on OK to close the Server Properties page.

SQL3

3. Now you will get dialog box saying that you should restart your SQL Server to take the changes take effect. Is is not done yet, you have to done one more thing to enable the “sa” login.

4. Now expand Security folder and go to Logins. You can see the “sa” account is disabled when you install SQL Server using Windows Authentication mode.

SQL4

5. Then right-click on the “sa” account and go to Login Properties. There you can set a password for the “sa” account.

SQL5

SQL5.1

6. Click on the Status page. There you can see the “sa” account is disabled by default. Click on the Enabled button to enable it. Then click on Ok to close the “sa” Login Properties.

SQL6

Now “sa” account is enabled and you can login to the SQL instance using the “sa” account after restarting the SQL Server.

Note: SQL Server service needs to be restarted to make this change effective.

Categories: SQL Server

Validate MultiLine TextBox Length

Hi all,

try this example to Validate MultiLine TextBox Length

<%@ Page Language="C#"%>
<html>
<head runat="server">
<title>Multiline Textbox max length</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>Text should be less then or equal to 25 chars</p>
<asp:TextBox runat="server" ID="MLTextBox"
TextMode="MultiLine" >
</asp:TextBox>
<asp:RegularExpressionValidator
runat="server" Display="dynamic"
ControlToValidate="MLTextBox"
ValidationExpression="^([\S\s]{0,25})$"
ErrorMessage="<p>only 25 chars please</p>">
</asp:RegularExpressionValidator>
<p />
<asp:Button runat="server" text="Submit"/>
</div>
</form>
</body>
</html>

Hope this helps

Good Luck.

Categories: ASP.Net