Friday, 2 December 2011

jQuery Fixed Header Scrollable GridView

Jquery fixed header scrollable gridview in asp.net
Fixed Header Scrollable Gridview Using jQuery in ASP.NET.

In this example im going to describe how to create fixed header scrollable gridview using jquery.

I have used northwind database to populate gridview and jquery fixed header plugin.




Thursday, 1 December 2011

Searching in HTML table with javascript

I have search a lot of article for how to make search in HTML table but i didn't find any good article so i wrote my own article for that,
Here is a script given bellow for how to make search in HTML table the question is that how to use this code so here is the step by step instructions :-
  • Copy and paste JavaScript code inside <head> tag.
  • Add Text box at the header row ( first row ) of your table in which you want to add functionality search.
  • Call the function searchRows at the onkeyup event of the text box.

How to Get Server Name and Server Port No in Asp.Net from Request Object




string link = "http://" + Request.ServerVariables["server_name"].ToString();
                if (Request.ServerVariables["SERVER_PORT"].ToString() !=null &&
Request.ServerVariables["SERVER_PORT"].ToString() != "")


Wednesday, 30 November 2011

how can we Create message box using javascript in asp.net

Create message box using javascript:-

Page.ClientScript.RegisterStartupScript(this.GetType(), "ErrorAlert", "alert('Some Technical error!!!');", true);
       

Tuesday, 29 November 2011

How can we upload file using file upload control in asp.net

With ASP.NET, accepting file uploads from users has become extremely easy. With the FileUpload control, it can be done with a small amount of code lines, as you will see in the following example. However, please notice that there are security concerns to to consider when accepting files from users! Here is the markup required:
<form id="form1" runat="server">
    <asp:FileUpload id="FileUploadControl" runat="server" />
    <asp:Button runat="server" id="UploadButton" text="Upload" 
 onclick="UploadButton_Click" />
    <br /><br />
    <asp:Label runat="server" id="StatusLabel" text="Upload status: " />
</form> 

insert,update,delete without using store procedure






using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;