'C# .NET ASP .NET,Grid View,DropDownList,AJAX,JavaScript,JQuery,asp.net articles,C#.NET Articles,ASP,ASP.NET,C#,VB,CSharp,C Sharp,dotnet,subhash jakhar,GridView,DropDownList,Visual Studio,ajax,Java Script,JQuery,XML,Crystal Reports,SSIS,SSRS,DetailsView,winforms,windows forms,windows application,code samples,.net code examples'
Monday, December 24, 2012
Wednesday, November 21, 2012
Query String With Example
==>>First you need have one page that have one textbox ID="NameTxtbox" and Have one button ID=" btnSubmit" Then on the button click you need write this code:---
protected void
btnSubmit_Click(object sender, EventArgs e)
{
Response.Redirect("MainPage.aspx?Name="+NameTxtbox.Text);
}==>> If you Want to have multiple control value on the Mainpage.aspx then you need to write this code:--
protected void btnSubmit _Click(object sender, EventArgs e)
{
Response.Redirect("MainPage.aspx?Name="+NameTxtbox.Text+"&Fname="+FNameTxtbox.Text);
}==>> Get the value of Query String on the Another page:---
protected void
Page_Load(object sender, EventArgs e)
{
Lblname.Text = Request.QueryString["Name"];
LblfName.Text = Request.QueryString["Fname"];
}
Thursday, March 29, 2012
Select All Check Box In Asp .Net With Java Script
Add This Code In Header Section Of your Aspx Page
1.
After The Add this code in Header Section You Need take A Grid View and Write This Code ..
1.
1: <script type="text/javascript">
2: function SelectAllAndDeSelectAllCheckBox(Chk)
3: {
5: var oItem = Chk.children;
6: var theBox= (spanChk.type=="checkbox") ? Chk: Chk.children.item[0];
7: xState=theBox.checked;
8: elm=theBox.form.elements;
9: for(i=0;i10:
11: if(elm[i].type=="checkbox" && elm[i].id!=theBox.id)13: {
16: if(elm[i].checked!=xState)19: }
20: script>
After The Add this code in Header Section You Need take A Grid View and Write This Code ..
1:
2: <asp:templatefield headertext="Select">
3: <headertemplate>
4: <input blogger_onclick="javascript:SelectAllAndDeSelectAllCheckBox(this);"
id="chkAll" runat="server" type="checkbox">
5: headertemplate>
6: <itemtemplate>
7: <asp:checkbox blogger_oncheckedchanged="CheckBox1_CheckedChanged"
id="CheckBox1" runat="server" autopostback="true">
8: asp:checkbox>itemtemplate>
9: asp:templatefield>
Hope This Help You
Subscribe to:
Posts (Atom)