mouse in new tab in google chrome and mobaeil no. validation

 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
        <script type="text/javascript">
            debugger
            $(function () {
                $("#lnkRegister").mousedown(function (e) {
                    //Right click event.
                    if (e.which == "3") {
                        //open a new tab
                        var win = window.open("Registerpage.aspx", '_blank');
                        win.focus();
                     
                    }
                })
            });
        </script>

or///////
===
 <asp:LinkButton id="lnkTitle" runat="server" OnClientClick="return NewWindow();" OnClick="lnkTitle_Click" > Open Window</asp:LinkButton>  

<script type="text/javascript">
function NewWindow() {
    document.forms[0].target = '_blank';
}
</script>

or/////
=========
 btnSubmit.Attributes.Add("href", "https://google.com/");
 btnSubmit.Attributes.Add("target", "_blank");




=======
mobile number validation


<asp:RegularExpressionValidator ControlToValidate="TxtMobileNo" ID="RegularExpressionValidator2" ValidationExpression="^[7-9][0-9]{9}$"  runat="server" ErrorMessage="Invalid!" ForeColor="Red"></asp:RegularExpressionValidator>

Comments

Popular posts from this blog

Create Schema Using C# Asp .Net Dynamically.

How to post image in blob using Windows Azure.

How to set Transaction and Roll Back using Entity Framework in C# Code.