> Click on start button
> Type settings in search box
> Click on Personalization
> Click on Background
> Click on dropdown "Change Picture Every"
> And Select 1 minute or two
> Click on start button
> Type settings in search box
> Click on Personalization
> Click on Background
> Click on dropdown "Change Picture Every"
> And Select 1 minute or two
> Click on Start button
> Type settings in search box than click on settings
> Click on "Ease of Access"
> Scroll down to left and Click on "Audio"
> Click on drop down list(Show audio alerts visually) and click Flash the active window.
> Click on Start Button
> Type settings and click on settings
> Click on Ease of Access
> Click on slider to change the font size or Click on 125% or 150% in drop down list.
Use External ethernet adaptor for connecting RJ45 Connector to USB.
Create Folder and save file App_Code/Utility/PrintHelper.cs and
App_Code/Utility/RPSaveClass.cs
https://drive.google.com/file/d/1cWQUNIdv240LG-KqRmw2VbwKd3ObyFlJ/view?usp=sharing
https://drive.google.com/file/d/1NMm62AeZNqNO0Pk_krMGmZFn14wzMpLx/view?usp=sharing
string.IsNullOrEmpty(txtDateAction.Text) ? (DateTime?)null : Convert.ToDateTime(txtDateAction.Text),
REFERENCE:- https://stackoverflow.com/questions/22689456/passing-null-value-of-datetime-of-asp-net-control-in-c-sharp
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
/// <summary>
/// Summary description for Batch
/// </summary>
public class Batch
{
public Batch()
{
select * from mst_batch where batch_end_date < '2020-04-21' and batch_end_date>'2019-01-01'
and ScheduleExamDate is null and RequestStatus in(2, 0)
---------------------------------------------------
select distinct requeststatus from mst_batch
HTML code
<asp:HyperLink id="btn_StudentRegister" Text="Register Student" runat="server" CssClass="GridViewButton" NavigateUrl='<%# "./ManageStudent/RegisterStudent.aspx?CA_ID=" + Eval("Agency_id") + "&course_id=" + Eval("course_id") + "&Batch_ID=" + Eval("Batch_id") %>'/>
-----------------------------
C# code
if (Batch_End_Date < currentdate)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('Batch End Date is over, You are not able to Register Student'); window.location='../WelcomeTP.aspx';", true);
return;
}
<asp:GridView ID="grdBatchDetails" runat="server" CssClass="table table-responsive" OnPreRender="grdBatchDetails_OnPreRender"
AutoGenerateColumns="False" EmptyDataText="No Records Found!" ShowHeaderWhenEmpty="True"
AllowPaging="True" PagerSettings-PageButtonCount="10" PagerSettings-Mode="Numeric" OnDataBound="grdBatchDetails_DataBound"
onpageindexchanging="grdBatchDetails_PageIndexChanging" PageSize="10" CellPadding="4" OnRowCommand="grdBatchDetails_RowCommand"
ForeColor="#333333" GridLines="None" Width="100%">
<Columns>
SELECT * FROM VW_MST_BATCH where [RequestStatus]=2 and Batch_Status=1
and Agency_id=1 and State_id=
case
when 0 = 0
then State_id
else 5
end
and Training_Partner_id='ESDM-JK-TP-000045'
------------
case
when 0 = 0
then State_id
else ''
end
and Training_Partner_id='ESDM-JK-TP-000045'
System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile("Yash@123", "md5").ToLower()
FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "SHA1");
------------------------------------------------
C# code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class DecryptPassword : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
Word wrap means that no use of horizontal scroll
>Click on Edit
> Click on Advance
>Click on Word Wrap to enable or disable it
> Check on 'show visual glyphs for word wrap'
>Click on Tools menu
>Click on Customize
> Check on Text editor
>Comments and uncomments will be appear.
---------------------------
or
>Click on Edit
>Click on Advance
>Click on Comment or uncomment section
Upload the file and create upload button. Below is the functionality of upload button
CS file code(below)
protected void btn_upload_Click(object sender, EventArgs e)
{
if (ViewState["CSRF"] != null && Convert.ToString(ViewState["CSRF"]) == Convert.ToString(Session["randomno"]))
{
DataTable dtExcelData = new DataTable();
if (FileUpload1.HasFile)
{
//Upload and save the file
try
{
<asp:Button ID="btnRecover" runat="server" Text="Recover" CssClass="btn btn-danger"
OnClientClick="return confirm('Are you sure to Recover this Batch ?')" OnClick="btnRecover_Click" />
Create (example notepad.bat) file and paste below code(Note :- if spaces in url {example:- program file} than use quotes "program file" else write simple):-
START C:\Windows\NOTEPAD.EXE
START C:\"Program Files\Microsoft Visual Studio"\2022\Community\Common7\IDE\devenv.exe
start C:\"Program Files (x86)\Microsoft SQL Server Management Studio 18"\Common7\IDE\Ssms.exe
START C:\"Program Files (x86)"\Google\Chrome\Application\chrome.exe "gmail.com" "mail.live.com" "sonipat.gov.in" "panipat.gov.in" "karnal.gov.in" "https://www.aiims.edu/en/notices/recruitment/aiims-recruitment.html" http://www.nhmharyana.gov.in/page?id=37" "https://hartronservices.com/advertisement/" "https://iasri.icar.gov.in/employment-notice/" "https://www.becil.com/vacancies" "https://www.iari.res.in/index.php?option=com_content&view=article&id=706&Itemid=471"
start C:\"Program Files\Mozilla Firefox"\firefox.exe "email.gov.in" "localhost" "esdm-skill.deity.gov.in"
Create PasswordGen.cs in App_Code/Utility
https://drive.google.com/file/d/1YxIv4j7UuGLrwmQ-IFabcXhF59KOpXe5/view?usp=sharing
or
generate SaltHashPassword
Create Passwordslthsh.cs in App_Code/Utility
https://drive.google.com/file/d/11j-lHntwt52S03Bv_-mcPJzYU7DP4-RF/view?usp=sharing
Create EmailHelper.cs in App_Code/Utility
https://drive.google.com/file/d/15VGWVFdYgZFTLjstgI-l7P8MsbDxo1_Z/view?usp=sharing
>If by username and password, you are not able to svn checkout
>Than use token as password.
Add Cookies.cs file in App_Code/Utility
https://drive.google.com/file/d/1h4bqFdiA8Hikcj5q7V-Ik9NkVF2at5F5/view?usp=sharing
In this we have also aadhar card verification.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
public partial class View_Logout : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Page_PreInit(object sender, EventArgs e)
{
Response.Redirect(Page.ResolveUrl(@"~/Login.aspx"));
}
}
private void ExportGridToPDF(GridView GridView1)
{
try
{
using (StringWriter sw = new StringWriter())
{
using (HtmlTextWriter hw = new HtmlTextWriter(sw))
{
//To Export all pages
GridView1.AllowPaging = false;
this.BindGrid();
GridView1.Columns[19].Visible=false;
GridView1.RenderControl(hw);
StringReader sr = new StringReader(sw.ToString());
Document pdfDoc = new Document(PageSize.A2, 10f, 10f, 10f, 0f);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=LevelWiseCourseReport+'" + System.DateTime.UtcNow.ToString() + "'.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
private void Export2Excel()
{
DataTable dt = new DataTable();
try
{
SqlParameter[] para = new SqlParameter[]
{
new SqlParameter("@CA_ID",drp_certifying.SelectedIndex>0?Convert.ToString(drp_certifying.SelectedValue):null),
new SqlParameter("@TP_Id",drp_trainingPartner.SelectedIndex>0?drp_trainingPartner.SelectedItem.Value:null),
new SqlParameter("@State_Id",drp_State.SelectedIndex>0?drp_State.SelectedItem.Value:null),
new SqlParameter("@Exam_Result",ddlResult.SelectedIndex>0? ddlResult.SelectedItem.Value:null),
Code for this is below:-
protected void Page_Init(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
Response.Cache.SetNoStore();
Browser.ClearBrowserData();
Page.ViewStateUserKey = Session.SessionID;
Response.Cache.SetValidUntilExpires(true);
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
Create App_Code/Utility/ExceptionHandler.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Text;
using System.Globalization;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Reflection;
Create Folder App_Code/Utility/Encryption.cs
#region XD World Recipe V 3
// FileName: Encryption.cs
// Author: Dexter Zafra
// Date Created: 3/20/2009
// Website: www.ex-designz.net
#endregion
using System;
using System.Collections.Generic;
using System.Text;
using System.Security;
using System.Security.Cryptography;
using System.Web.Services;
using System.IO;
public void disablebrowserbackbutton()
{
Browser.ClearBrowserData();
}
protected void refreshimgbtn_Click(object sender, ImageClickEventArgs e)
{
Page.MaintainScrollPositionOnPostBack = true;
txt_captch.Text = null;
captcha.ImageUrl = "~/CaptchaHandler.ashx?r=" + DateTime.Now.Ticks.ToString();
SetCaptchaText();
txtuserName.Focus();
}
private void SetCaptchaText()
{
try
{
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
//using System.Web.UI.aspxlControls;
using System.Drawing;
using System.Drawing.Drawing2D;
public class CatpchaImage
{
public static string SESSION_CAPTCHA = "CAPTCHA";
<%@ WebHandler Language="C#" Class="CaptchaHandler" %>
using System;
using System.Web;
using System.Drawing;
using System.Drawing.Text;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
using System.IO;
using System.Web.SessionState;
//namespace CaptchaControl
//{
public class CaptchaHandler : IHttpHandler, IReadOnlySessionState
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
Response.Cache.SetNoStore();
Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1d);
Response.Expires = -1500;
Response.CacheControl = "no-cache";
Page.Response.Cache.SetCacheability(HttpCacheability.NoCache);
System.Web.Security.FormsAuthentication.SignOut();
if (Session["trainingpartnersession"] != null)
{
Session.Remove("trainingpartnersession");
}
Create App_Code/Utility/Browser.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
/// <summary>
/// Summary description for Browser
/// </summary>
public class Browser
{
public Browser()
{
//
// TODO: Add constructor logic here
//
}
public static void ClearBrowserData()
{
System.Web.HttpContext.Current.Response.Buffer = true;
System.Web.HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
System.Web.HttpContext.Current.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
System.Web.HttpContext.Current.Response.Expires = -15000;
System.Web.HttpContext.Current.Response.CacheControl = "no-cache";
System.Web.HttpContext.Current.Response.Cache.SetNoStore();
System.Web.HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
System.Web.HttpContext.Current.Response.AppendHeader("Cache-Control", "no-store");
System.Web.HttpContext.Current.Response.AppendHeader("Cache-Control", "Must-revalidate");
System.Web.HttpContext.Current.Response.AppendHeader("Cache-Control", "Proxy-revalidate");
}
public static void CrossSiteRequestForgery(HiddenField hfCSEF)
{
//Code start for Cross Site Request Forgery
Random randomobj = new Random();
HttpContext.Current.Session["randomno"] = randomobj.Next();
hfCSEF.Value = HttpContext.Current.Session["randomno"].ToString();
//End Code
}
}
Create App_Code/Utility/Cache.cs
#region XD World Recipe V 3
// FileName: Cache.cs
// Author: Dexter Zafra
// Date Created: 8/26/2008
// Website: www.ex-designz.net
#endregion
using System;
using System.Web;
using System.Collections;
using System.Collections.Generic;
using System.Web.Caching;
Create BaseMasterPage.cs file in App_Code/Common/
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public class BaseMasterPage : MasterPage
{
protected HiddenField hiddenSession;
public BaseMasterPage()
{
//
// TODO: Add constructor logic here
//
}
public string SessionText
{
get
{
return hiddenSession.Value;
}
}
}
Create SecurityLib.cs in App_Code/Common Folder
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.SessionState;
using DataAccessLayer;
public class UtilityLibrary
{
public UtilityLibrary()
{
//
// TODO: Add constructor logic here
//
if(a==0){
Sub_Scheme2.Visible = false;
PMU_Address.Visible = false;
Txt_CF.Visible = true;
Txt_RCCF.Visible = true;
Txt_CFClaimforRC.Visible = true;
Lbl_Show_Calculation_Res_CF.Visible = true;
Txt_RCCFClaimforRC.Visible = true;
Lbl_Show_Calculation_Res_RCCF.Visible = true;
Txt_CFClaimforGC.Visible = true;
Lbl_Show_Calculation_Gen_CF.Visible = true;
Txt_RCCFClaimforGC.Visible = true;
> If you get error of "there is no database backup found", while restoring of database.
> Than delete the database that you have created new (blank)
> Restore the database without new (blank) databse.
> If you are getting error(below) in running website
> Install IIS
>Open Control Panel
> Click on Sound
>Click on Sounds tab (below screenshot).
or
> Right click on right side speaker button
> Click on open sound settings
>Click on Sound control panel
> Click on Sound tab
> Click on start navigation or navigation bar(screenshot below)
> Run cmd(command prompt)
> Enter command ipconfig/all
> You will find physical address example 00:1a:c2:7b:00:47 or 00-1a-c2-7b-00-47
This Physical address is the MAC address.
> First install SQL Server express
> Than install SQL Server Management studio(SSMS)--(Select Express Advance option while installing)
reference:- https://phoenixnap.com/kb/install-sql-express
https://blog.devart.com/sql-server-express-edition.html
Previous versions of SQL
https://docs.microsoft.com/en-us/sql/ssms/release-notes-ssms?view=sql-server-2016#1653
public class StudentRegisterBulkupload : IDisposable
{
private bool m_disposed = false;
protected virtual void Dispose(bool disposing)
{
if (m_disposed)
return;
if (disposing)
{
}
m_disposed = true;
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
~StudentRegisterBulkupload()
{
Dispose(false);
}
}
Add these three files to App_Code/DataAccess folder
DBManager.cs
DBManagerFactory.cs
IDBManager.cs
https://drive.google.com/file/d/1Rv-GvIRnzwStFl3TP0gMLHMPiQAMwCPw/view?usp=sharing
https://drive.google.com/file/d/1IPmMrPi6BiT0sCjAlMiQ8ed9GjgEEUmT/view?usp=sharing
https://drive.google.com/file/d/1FE1sEuyyIEiUtNDwgCo9a3u-Eq_n2niq/view?usp=sharing
https://www.geeksforgeeks.org/different-types-of-html-helpers-in-asp-net-mvc/
https://www.c-sharpcorner.com/article/learn-about-razor-view-engine/
https://www.c-sharpcorner.com/article/how-to-create-a-custom-helper-class-in-Asp-Net-mvc/
https://www.geeksforgeeks.org/different-types-of-html-helpers-in-asp-net-mvc/
Add ActivityLog.cs in App_Code/Common/ActivityLog.cs
https://drive.google.com/file/d/1_s-QIAlR8inx-P7iv6YDvOfwtSEZTi4x/view?usp=sharing
Also we have to create TempLoginStatus, Users tables and SP_InsertActivityLog stored procedure.
Add file to App_Code/Common/AadhaarMasking.cs
using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Web;
/// <summary>
/// Summary description for AadhaarMasking
/// </summary>
public class AadhaarMasking
{
public AadhaarMasking()
{
//
// TODO: Add constructor logic here
//
}
public string AadhaarNoMasking(string AadhaarNo)
{
string MaskAadhaarNo = "";
if (AadhaarNo.Length > 4)
{
MaskAadhaarNo = AadhaarNo.Substring(AadhaarNo.Length - 4).PadLeft(AadhaarNo.Length, 'X');
}
return MaskAadhaarNo;
}
}
---------------------------------
aspx page code
<asp:Label ID="lbl_AdhaarMask" runat="server" Text='<%#new AadhaarMasking().AadhaarNoMasking(Eval("Adharcard_No").ToString()) %>'></asp:Label>