Saturday, May 23, 2026

QR CODE GENERATOR

 https://chromewebstore.google.com/detail/qr-code-generator/afpbjjgbdimpioenaedcjgkaigggcdpp?hl=en

Thursday, May 21, 2026

Website popup in aspx page if open website

 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>


<!DOCTYPE html>

<html>

<head runat="server">

    <title>Popup Example</title>


    <style>

        /* Background overlay */

        .popup-overlay {

            position: fixed;

            top: 0;

            left: 0;

            width: 100%;

            height: 100%;

            background: rgba(0,0,0,0.6);

            display: flex;

            justify-content: center;

            align-items: center;

            z-index: 9999;

        }


        /* Popup box */

        .popup-box {

            background: white;

            width: 400px;

            padding: 20px;

            border-radius: 10px;

            text-align: center;

            box-shadow: 0px 0px 10px gray;

        }


        .popup-box h2 {

            color: #0d6efd;

        }


        .close-btn {

            background: red;

            color: white;

            border: none;

            padding: 10px 20px;

            cursor: pointer;

            border-radius: 5px;

        }


        .admission-btn {

            background: green;

            color: white;

            padding: 10px 20px;

            text-decoration: none;

            border-radius: 5px;

            display: inline-block;

            margin-top: 10px;

        }

    </style>


    <script>

        // Show popup when page opens

        window.onload = function () {

            document.getElementById("popup").style.display = "flex";

        }


        // Close popup

        function closePopup() {

            document.getElementById("popup").style.display = "none";

        }

    </script>


</head>

<body>


    <form id="form1" runat="server">


        <!-- Popup -->

        <div id="popup" class="popup-overlay">


            <div class="popup-box">

                <h2>Admission Open 2026</h2>


                <p>

                    Join NRsolution4u Training Programs

                </p>


                <a href="Admission.aspx" class="admission-btn">

                    Apply Now

                </a>


                <br /><br />


                <button type="button" class="close-btn" onclick="closePopup()">

                    Close

                </button>

            </div>


        </div>


    </form>


</body>

</html>

Website pop up box using HTML

 <!DOCTYPE html>

<html lang="en">

<head>

   


    <style>

       


        /* Popup Background */

        .popup{

            display: flex;

            position: fixed;

            top: 0;

            left: 0;

            width: 100%;

            height: 100%;

            background: rgba(0,0,0,0.6);

            justify-content: center;

            align-items: center;

        }


        /* Popup Box */

        .popup-content{

            background: #fff;

            width: 350px;

            padding: 25px;

            border-radius: 10px;

            text-align: center;

            position: relative;

            box-shadow: 0 0 15px rgba(0,0,0,0.3);

        }


        .popup-content h2{

            color: #007bff;

            margin-bottom: 10px;

        }


        .popup-content p{

            margin-bottom: 20px;

        }


        .admission-btn{

            display: inline-block;

            padding: 10px 20px;

            background: #28a745;

            color: white;

            text-decoration: none;

            border-radius: 5px;

            font-size: 16px;

        }


        .admission-btn:hover{

            background: #218838;

        }


        /* Close Button */

        .close{

            position: absolute;

            top: 10px;

            right: 15px;

            font-size: 22px;

            cursor: pointer;

            color: red;

        }

    </style>

</head>

<body>


    <!-- Popup -->

    <div class="popup" id="popupBox">

        <div class="popup-content">

            <span class="close" onclick="closePopup()">&times;</span>


            <h2>Admission Open 2026</h2>


            <p>

                Apply now for admission and start your career journey with us.

            </p>


            <a href="https://youradmissionlink.com" 

               target="_blank" 

               class="admission-btn">

               Apply Now

            </a>

        </div>

    </div>


    <script>

        // Close Popup Function

        function closePopup() {

            document.getElementById("popupBox").style.display = "none";

        }


        // Popup automatically opens when website loads

        window.onload = function () {

            document.getElementById("popupBox").style.display = "flex";

        };

    </script>


</body>

</html>

Friday, August 29, 2025

Summer Note EDITOR

 Step-1 

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true" CodeFile="aboutschool.aspx.cs" Inherits="admin_aboutschool" 

ValidateRequest="false" %>


STEP-2

 <script src="/ckeditor/ckeditor.js"></script>  (  IF FOLDER WITHIN FOLDER ADMIN / )


STEP-3  CREATE EDITOR USING  TEXTAREA TAG 

 <textarea runat="server" id="txtAboutInternship" class="ckeditor"></textarea>


STEP-4  CRAETE TABLE USING NVARCHAR 

create table aboutschool(about nvarchar(MAX));


STEP-5 CODE DATABASE 
 string k1 = "insert into aboutschool values(@about1)";
        cm = new SqlCommand(k1, cn);
        cm.Parameters.AddWithValue("about1", txtAboutInternship.InnerText);
        cm.ExecuteNonQuery();
        Label4.Text = "update Successfully";
    }


Step-6  display data in summer note editor 

 protected void display()
    {


        string path = ConfigurationManager.AppSettings["emrsdb1"];
        cn = new SqlConnection(path);
        cn.Open();

        string k1 = "select * from aboutschool";
        cm = new SqlCommand(k1, cn);
        dr = cm.ExecuteReader();
        if (dr.Read())
        {

            txtAboutInternship.InnerText = dr["about"].ToString();
        }
        dr.Close();


    }









ADVANCE AUGUST 2025 - 2026

 HOW TO SET  PATH FROM HYPERLINK CONTROL WITH EVEL 

 <asp:TemplateField HeaderText="View PDF">

          <ItemTemplate>

  <asp:HyperLink ID="HyperLink1" runat="server" Text="Vew" 

  NavigateUrl='<%#  "/upload/" + Eval("filename") %>' >


</asp:HyperLink>

            </ItemTemplate>

   </asp:TemplateField>

---------------------------------------------------------------------------

HINDI STORAGE IN NVARCHAR COLUMN 

create table newsdb(id int identity(1,1), title nvarchar(MAX), filename varchar(MAX));

-----------------------------------------------------------------------------------------------------------------

DIRECT UPLOAD DATA TO SERVER FOLDER 

 FileUpload1.SaveAs(Server.MapPath(@"~") + "//upload//" + FileUpload1.FileName);
        



Monday, February 24, 2025

ADVANCE 2025

 HTML TABLE SCROLL BAR 

<style>

     .table-container {

            width: 100%;

            overflow-x: auto; /* Enables horizontal scrolling */

            border: 1px solid #ddd;

        }

</STYLE> 

 <div class="table-container">



table 




</div> 

Wednesday, December 20, 2023

GRIDVIEW ON ROW DATA BOUND EVENT

 Database Create 

Student : roll , name , city , cost 

Fix 6 Value  in Database Record 


====================================================================

Default.aspx Page 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="WebApplication1._default" %>


<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 

OnRowDataBound = "OnRowDataBound" ShowFooter="True">

    <Columns>

        <asp:BoundField DataField="roll" HeaderText="Roll" ItemStyle-Width = "100">

<ItemStyle Width="100px"></ItemStyle>

        </asp:BoundField>

        <asp:BoundField DataField="name" HeaderText="Name" ItemStyle-Width = "100">


<ItemStyle Width="100px"></ItemStyle>

        </asp:BoundField>


        <asp:BoundField DataField="city" HeaderText="Name" ItemStyle-Width = "100">

<ItemStyle Width="100px"></ItemStyle>

        </asp:BoundField>

        <asp:TemplateField HeaderText="City">


            <ItemTemplate>




                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("cost") %>'></asp:TextBox>

            </ItemTemplate>



        </asp:TemplateField>

    </Columns>

</asp:GridView>

    </form>

</body>

</html>

=====================================================================


C#  Coading  Concept 

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

using System.Data.SqlClient;


namespace WebApplication1
{
    public partial class _default : System.Web.UI.Page
    {
        SqlConnection cn;
        SqlCommand cm;
        SqlDataReader dr;

        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {

                display();
            }

        }



        protected void display()
        {

            string path = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\dell\Desktop\gridvcont\WebApplication1\WebApplication1\App_Data\Database1.mdf;Integrated Security=True";
            cn = new SqlConnection(path);
            cn.Open();


            string k = "select * from student";
            cm = new SqlCommand(k, cn);
            dr = cm.ExecuteReader();

            GridView1.DataSource = dr;
            GridView1.DataBind();

            dr.Close();



        }
        protected void OnRowDataBound(object sender, GridViewRowEventArgs e)
        {

            
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                
                TextBox tb = (TextBox)e.Row.FindControl("TextBox1");

                 TableCell cell = e.Row.Cells[2];

                string cityname = cell.Text;

                if (cityname == "NAGPUR")
                {

                    tb.BackColor = System.Drawing.Color.Red;
                }

                
            }

           

        }

    }
}

QR CODE GENERATOR

 https://chromewebstore.google.com/detail/qr-code-generator/afpbjjgbdimpioenaedcjgkaigggcdpp?hl=en