<script type=”text/javascript”> if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x; var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number if (ieversion < 7)... Read More
Javascript to find X ,Y position of cursor
1 min read
window.onload = init; function init() { if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; } function getCursorXY(e) { document.getElementById(‘cursorX’).value = (window.Event) ? e.pageX : event.clientX... Read More
Javascript to set a focus in update panel
1 min read
Add Below js file in your project var lastFocusedControlId = ""; function focusHandler(e) { document.activeElement = e.originalTarg et; } function appInit() { if (typeof(window.addEventListener)... Read More
<object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0″ width=”350px” height=”200px” title=”flashheader”> <param name=”movie” value=”Contact_us.swf”> <param name=”quality” value=”high”> <param name=”quality” value=”high”> <param name=”wmode” value=”transparent”> embed tag here…. </object>... Read More
Css to attach font from path
1 min read
@font-face { font-family: ‘NILKANTHNormal’; src: url(‘nilkanth-webfont.eot’); src: local(‘?’), url(‘nilkanth-webfont.woff’) format(‘woff’), url(‘nilkanth-webfont.ttf’) format(‘truetype’), url(‘nilkanth-webfont.svg#webfonth937w4SJ’) format(‘svg’); font-weight: normal; font-style: normal; }... Read More
Export Datatable To excel .cvs File with c#
1 min read
DataTable dtUsers = Session[“UsersForApproval”] as DataTable; DataTable dtexprot = new DataTable(); if (Session[“UsersForApproval”] == null) { dtexprot = UserDetails.GetUsersForApproval(); Session[“UsersForApproval”] = dtUsers; } else {... Read More
Redirect code by page request url
1 min read
This Code Redirect to page which have a user control for login button on login page. Code: Response.Redirect(Page.Request.Url.PathAndQuery);... Read More
Custom Error Page
1 min read
Hello Friend is the custom error page in sytem.web tag in a webconfig……. Examnple: <customErrors mode=”On” defaultRedirect=”ErrorPage.aspx”> <error statusCode=”403″ redirect=”NoAccess.htm”/> <error statusCode=”404″ redirect=”FileNotFound.htm”/> </customErrors>... Read More
Error Log in global.asax file in asp.net
1 min read
Write This code appplication_error event in a global.asax Exception ex = Server.GetLastError() as Exception; HttpContext.Current.Session[“Error”] = ex.Message; Server.ClearError(); StringBuilder sb = new StringBuilder(); if (ex... Read More
Concate image path with file name in gridview. Ex: #String.Concat(“~/Masters/CurrencyImage/”,Eval(“Currancy_Image”))... Read More

Neural Network in C#
Clean Architecture in ASP.NET Core
Using caching in Asp.Net Core Minimal APIs
Use ChatGPT in C# Application
About Blazor with .Net Core