Posts

Showing posts from April, 2010

How to hide generated javascript file in visual studio code

In this post I am going to show you a cool trick in visual studio code. Let's suppose you are writing typescript code in visual studio code and you want to hide generated javascript code.

Create .vscode folder in your folder and then create settings.json file and paste following code

{ "files.exclude": { "node_modules":true, "**/.git": true, "**/.DS_Store": true, "**/*.js.map": true, "**/*.js": {"when": "$(basename).ts"}     } }

How To Render Thead and Tbody tag in GridView

Image
In this post i am going to share tips and tricks about how to generate Thead and Tbody in gridview because default GridView in asp.net generate table>tr>th type of structure. uncomment this statement and see the result //Uncomment this line for THEAD and TBODY //grdPage.HeaderRow.TableSection = TableRowSection.TableHeader;<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title></title></head><body><formid="form1"runat="server"><div><asp:GridViewID="grdPage"runat="server"></asp:GridView></div></form></body></html>using System; using System…

How to validate form field using Jquery in asp.net

Image
In this post i am going to show how to validate form field using Jquery in asp.net <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title></title><scriptsrc="scripts/jquery.js"type="text/javascript"></script> <style type="text/css"> .label { float: left; width: 120px; } .textbox { width: 200px; } .error { color: red; padding-left: 10px; } div { padding: 5px; } </style> <script type="text/javascript"> …