Saturday, 29 December 2012

Move Gridview Rows Up and Down by using JQuery in ASP.NET using C#.NET/VB.NET

Move Gridview Rows Up and Down by using JQuery in ASP.NET
ASP.NET:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Move Gridview Rows Up and Down by using JQuery in ASP.NET</title>
    <style type="text/css">

Thursday, 20 December 2012

Compare Validation for dates of format dd-MMM-yyyy in ASP.NET using Javascript

Compare Validation for dates of format dd-MMM-yyyy in ASP.NET using Javascript
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajc" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Compare Validation for dates of format dd-MMM-yyyy in ASP.NET using C#/VB.NET
    </title>

Compare Validation for dates of format dd-MMM-yyyy in ASP.NET using C#/VB.NET

Compare Validation for dates of format dd-MMM-yyyy in ASP.NET using C#/VB.NET
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajc" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Compare Validation for dates of format dd-MMM-yyyy in ASP.NET using C#/VB.NET

ASP.NET How to get all file names in a folder using C#/VB.NET

ASP.NET How to get all file names in a folder using C#/VB.NET
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

Thursday, 13 December 2012

Compare Validation for dates of format dd-MMM-yyyy in ASP.NET using C#/VB.NET


Compare Validation for dates of format dd-MMM-yyyy in ASP.NET using C#/VB.NET

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Compare Validation for dates of format dd-MMM-yyyy in ASP.NET using C#/VB.NET</title>
    <style type="text/css">
        .color
        {
            color: Red;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />

Monday, 10 December 2012

How to convert a numeric value into English words in ASP.NET using c#/VB.NET.

How to convert a numeric value into English words in ASP.NET using c#/VB.NET.

ASP.NET:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>How to convert a numeric value into English words in ASP.NET using c#/VB.NET</title>
</head>
<body>
    <form id="form1" runat="server">

Sunday, 9 December 2012

jQuery empty() and remove() methods by Example in ASP.NET

ASP.NET:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>jQuery empty() and remove() methods by Example</title>
    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
    <style type="text/css">

Thursday, 6 December 2012

Issue in modalpopupextender when clicking enter key in textbox Or Trigger a Button Click with JavaScript on the Enter key in a TextBox

Issue in modalpopupextender when clicking enter key in textbox Or Trigger a Button       Click with JavaScript on the Enter key in a TextBox
<%@ Register Assembly="AjaxControlToolkit"Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Issue in modalpopupextender when clicking enter key in textbox Or Trigger a Button
        Click with JavaScript on the Enter key in a TextBox</title>
    <script language="javascript" type="text/javascript">
        function btnclick() {
            alert("Hi");
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <ajax:ModalPopupExtender ID="ModalRecipients"BehaviorID="ModalRecipients" runat="server"
            PopupControlID="pnlRecipients" DropShadow="true"
            TargetControlID="btnMain"BackgroundCssClass="modalBackground">
        </ajax:ModalPopupExtender>
        <div style="overflow: auto;">
            <asp:Panel ID="pnlRecipients" runat="server" Width="550px"Style="background-color: White;
                display: none">
                <asp:TextBox runat="server" ID="txt" onkeydown="if (event.keyCode == 13) document.getElementById('btn').click()" />
                <asp:Button runat="server" ID="btn" OnClick="btn_Click"Text="button" />
            </asp:Panel>
              <asp:Button runat="server" ID="btnMain"OnClick="btnMain_Click" Text="MainPage Button"  UseSubmitBehavior="false" />
        </div>
    </div>
    </form>
</body>
</html>

C#:
using System.Globalization;


public partial class EnterKeyCheck : System.Web.UI.Page
{
    protected void btn_Click(object sender, EventArgs e)
    {
        Response.Write(txtData.Text );
    }
   
    protected void btnMain_Click(object sender, EventArgs e)
    {
        ModalRecipients.Show();
    }
  
}


VB.NET:
Imports System.Globalization

Partial Public Class EnterKeyCheck
    Inherits System.Web.UI.Page
    Protected Sub btn_Click(ByVal sender As ObjectByVal e As EventArgs)
        Response.Write(txtData.Text )
    End Sub

    Protected Sub btnMain_Click(ByVal sender As ObjectByVal e As EventArgs)
        ModalRecipients.Show()
    End Sub

End Class



Output:




How to convert dd-mm-yyyy into dd/mm/yyyy in ASP.NET using C#/VB.NET

How to convert dd-mm-yyyy into dd/mm/yyyy in ASP.NET using C#/VB.NET

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>How to convert dd-mm-yyyy into dd/mm/yyyy in ASP.NET using C#/VB.NET</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="txtDate" runat="server"></asp:TextBox><br />
        <asp:Label ID="lblDate" runat="server"></asp:Label><br />
        <asp:Button ID="btnConvert" Text="Convert" runat="server"
            onclick="btnConvert_Click" />
    </div>
    </form>
</body>
</html>

In C#:
using System.Globalization;

public partial class DateConversion : System.Web.UI.Page
{
       #region How to convert dd/mm/yyyy into dd-mm-yyyy

    protected void btnConvert_Click(object sender, EventArgs e)
    {
        DateTime dt = DateTime.ParseExact(txtDate.Text, "dd/MM/yy", CultureInfo.InvariantCulture);
        lblDate.Text = dt.ToString("dd-MM-yyyy");
    }
    #endregion
}


In VB.NET:
Imports System.Globalization

Partial Public Class DateConversion
    Inherits System.Web.UI.Page
#Region "How to convert dd/mm/yyyy into dd-mm-yyyy"

    Protected Sub btnConvert_Click(ByVal sender As Object, ByVal e As EventArgs)
        Dim dt As DateTime = DateTime.ParseExact(txtDate.Text, "dd/MM/yy", CultureInfo.InvariantCulture)
        lblDate.Text = dt.ToString("dd-MM-yyyy")
    End Sub
#End Region
End Class

Output:


© 2012-2014 Aspdotnet-Kishore.blogspot.com. All Rights Reserved.
The content is copyrighted to Kishore and may not be reproduced on other websites without permission from the owner.