Friday, May 6, 2022

Thursday, May 5, 2022

Monday, May 2, 2022

File download docx OR XML file in ASP.NET C#

 protected void lnkDownloadAnnexB_Click(object sender, EventArgs e)

    {

        try

        {

            Response.ContentType = "application/docx";


            string filePath = "~/Document/Download/ANNEXURE-B.docx";


            Response.AddHeader("Content-Disposition", "attachment;filename=\"" + filePath + "\"");

            Response.TransmitFile(Server.MapPath(filePath));

            Response.End();

        }

How to create dashboard in ASP.NET C#

 aspx file page


<%@ Page Title="" Language="C#" MasterPageFile="~/View/Admin/Admin.master" AutoEventWireup="true" CodeFile="Dashboard.aspx.cs" Inherits="View_Admin_Default" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>

<script type="text/javascript">

    $(function () {

        $('#container').highcharts({

            chart: {

                plotBackgroundColor:null,

                plotBorderWidth: 1,

                plotShadow: false

            },