Access denied; you need the SUPER privilege for this operation

Access denied; you need the SUPER privilege for this operation





ERROR 

This Stored Procedure  used to only on Localhost

CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_delete_course`(In eid INT)
BEGIN
delete  from `courses` where courseid=eid;
END


REMOVE

DEFINER=`root`@`localhost`


Working Query 

This Stored Procedure  used to only on Server Side

CREATE  PROCEDURE `sp_delete_course`(In eid INT)
BEGIN
delete  from `courses` where courseid=eid;
END



Before Uploading to the Server 
 Clear DEFINER=`root`@`localhost` than working fine




Textbox TextMode Property Date and DateTimeLocal Using Asp.Net c#

Textbox TextMode Property Date and DateTimeLocal

We need date and datetime use in the Textbox add TextMode =Date or DateTimeLocal in the Textbox property.

                                   DEMO
                                                                                             



HTML CODING

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div align="center">
    <table><tr><td>
        <asp:Label ID="Label1" runat="server" Text="Date"></asp:Label>
        </td><td>
            <asp:TextBox ID="txtDate" runat="server" TextMode="Date"></asp:TextBox>
        </td></tr>
        <tr><td>
            <asp:Label ID="Label2" runat="server" Text="DateTimeLocal"></asp:Label>
            </td><td>
                <asp:TextBox ID="txtDateLocal" runat="server" TextMode="DateTimeLocal"></asp:TextBox>
            </td></tr>
        <tr><td></td><td>
            <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Select" />
            </td></tr>
    </table>
    </div>
    </form>
</body>
</html>


C# CODING

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Date_DateTime : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        DateTime date1, datetime1;

        date1 = Convert.ToDateTime(txtDate.Text);

        datetime1 = Convert.ToDateTime(txtDateLocal.Text);

  Response.Write("<script>alert('" + "Date with Time =" + datetime1.ToString("dd/MM/yyyy hh:mm tt") + "  Date =" + date1.ToString("dd/MM/yyyy") + "')</script>");

    }
}




Add new Webform - add two textbox change property textmode="Date" and "DateTimeLocal"







Add cs file - Textbox selected date convert to DateTime  and get date format 





Textbox Date Validation below like this






Supported Browsers


TextModeNot CompatibleCompatible

DateIE(6,7,8,9,10), FirefoxChrome, Safari, Opera
DateTimeLocalIE(6,7,8,9,10), FirefoxChrome, Safari, Opera



TextMode = "Week" 
<asp:TextBox ID="TextBox1" runat="server" TextMode="Week"></asp:TextBox>


TextModeNot CompatibleCompatible
WeekIE(6,7,8,9,10), FirefoxChrome, Safari, Opera

TextMode = "Color" 

<asp:TextBox ID="TextBox1" runat="server" TextMode="Color"></asp:TextBox>

TextModeNot CompatibleCompatible
ColorIE(6,7,8,9,10), Firefox(Lower Version), SafariChrome, Firefox(Version 29.0.) and Opera

TextMode = "Email" 

<asp:TextBox ID="TextBox1" runat="server" TextMode="Email"></asp:TextBox>



TextModeNot CompatibleCompatible
EmailIE(6,7,8,9), Firefox(Lower Version), SafariIE 10,11,Chrome, Firefox(29), Opera

TextMode = "Month" 

<asp:TextBox ID="TextBox1" runat="server" TextMode="Month"></asp:TextBox>

TextModeNot CompatibleCompatible
MonthIE(6,7,8,9,10), FirefoxChrome, Safari, Opera

TextMode = "Number"
<asp:TextBox ID="TextBox1" runat="server" TextMode="Number"></asp:TextBox>


TextModeNot CompatibleCompatible
NumberIE(6,7,8,9,10), FirefoxChrome, Firefox(29), Safari, Opera

TextMode = "Range" 


<asp:TextBox ID="TextBox1" runat="server" TextMode="Range"></asp:TextBox>


TextModeNot CompatibleCompatible
RangeIE(6,7,8,9), FirefoxIE 10,11, Chrome, Firefox(29), Safari, Opera

TextMode = "Search"

<asp:TextBox ID="TextBox1" runat="server" TextMode="Search"></asp:TextBox>



TextModeNot CompatibleCompatible
SearchIE(6,7,8,9), FirefoxIE 10,11, Chrome, Safari

TextMode = "Time" 

<asp:TextBox ID="TextBox1" runat="server" TextMode="Time"></asp:TextBox>

TextModeNot CompatibleCompatible
TimeIE(6,7,8,9,10), FirefoxChrome, Safari, Opera

 TextMode = "Url" 

<asp:TextBox ID="TextBox1" runat="server" TextMode="Url"></asp:TextBox>


TextModeNot CompatibleCompatible
UrlIE(6,7,8,9), FirefoxIE 10,11, Chrome, Firefox 29, Opera


GridView custom CSS style and text alignment example in ASP.NET

GridView custom CSS style


Gridview display the database values on GridView Row but we want to custom style add the css for Gridview row,header,paging like below example using asp.net.

                                   DEMO

                    
                           
   CSS 


.SGrid {
    width:auto;
    background-color#fff;
    margin5px 0 10px 0;
    bordersolid 1px #ff006e;
    border-collapse:collapse;
}

.SGrid th {
    padding4px 2px;
    color#fff;
    background:#f17c7c;
    border-leftsolid 1px #ff006e;
    font-size0.9em;
    text-align:center !important;
}
.SGrid td {
    padding2px;
    bordersolid 1px #ff006e;
    color#717171;
    text-align:center !important;
}
.SGrid .alt { background#cec4c4 ; }
.SGrid .pgr { background#424242 ; }
.SGrid .pgr table { margin5px 0; }
.SGrid .pgr td {
    border-width0;
    padding0 6px;
    border-leftsolid 1px #f17c7c;
    font-weightbold;
    color#f17c7c;
    line-height12px;
    background:#fff;
     text-align:center !important;
 }  
.SGrid .pgr a { color:#424242text-decorationnone; }
.SGrid .pgr a:hover { color:#ff006etext-decorationnone; }


  HTML CODING




<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">

     /*GRIDVIEW STYLISH*/ 

        .SGrid {
    width:auto;
    background-color: #fff;
    margin: 5px 0 10px 0;
    border: solid 1px #ff006e;
    border-collapse:collapse;
}

.SGrid th {
    padding: 4px 2px;
    color: #fff;
    background:#f17c7c;
    border-left: solid 1px #ff006e;
    font-size: 0.9em;
    text-align:center !important;
}
.SGrid td {
    padding: 2px;
    border: solid 1px #ff006e;
    color: #717171;
    text-align:center !important;
}
.SGrid .alt { background: #cec4c4 ; }
.SGrid .pgr { background: #424242 ; }
.SGrid .pgr table { margin: 5px 0; }
.SGrid .pgr td {
    border-width: 0;
    padding: 0 6px;
    border-left: solid 1px #f17c7c;
    font-weight: bold;
    color: #f17c7c;
    line-height: 12px;
    background:#fff;
     text-align:center !important;
 }  
.SGrid .pgr a { color:#424242; text-decoration: none; }
.SGrid .pgr a:hover { color:#ff006e; text-decoration: none; }

 /*GRIDVIEW STYLISH*/
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div align="center">
        <asp:GridView ID="GridView1" AlternatingRowStyle-CssClass="alt" PagerStyle-CssClass="pgr" CssClass="SGrid"

            runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="SqlDataSource1" PageSize="3">
<AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
            <Columns>
                <asp:BoundField DataField="Id" HeaderText="Id" ReadOnly="True" SortExpression="Id" />
                <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                <asp:BoundField DataField="Username" HeaderText="Username" SortExpression="Username" />
                <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dbcon %>" SelectCommand="SELECT * FROM [register]"></asp:SqlDataSource>
    </div>
    </form>
</body>

</html>



Add - New Webform - Write Css Styles  for Gridview Row,Header,Pager 





Next - Add pager Custom Css and call the CSS Class for Gridview alt,SGrid,pgr





Below Like After Added Custom css Show the Gridview Text Align Center