<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FindgridControlByJquery.aspx.cs" Inherits="AjaxApp.FindgridControlByJquery" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<style type="text/css">
.auto-style1 {
width: 100%;
}
.auto-style2 {
}
#top {
background-color: #ccc;
padding: 20px
}
.intro {
color: red;
font-weight: bold;
}
</style>
<script>
$(document).ready(function () {
//alert("hi");
$("#btnShow").click(function () {
// Class Selector Used
$(".intro").css("background-color", "#00FFFF");
//Find Label
var lbl = $("#lblName").text();
var TextName = lbl + " Singh";
alert(TextName);
// Find Button
var btnValue = $("#btnsubmit").val();
alert(btnValue);
//Find CheckBox
var chkVallue = $("#chkName").is(':checked');
alert(chkVallue);
if (chkVallue="true") {
alert("Checkbox is checked.");
}
else if (chkVallue="false") {
alert("Checkbox is unchecked.");
}
//To check whether checkbox is checked or not
var checkbox = $("#CheckBox1").is(":checked");
alert(checkbox);
//To check whether radiobutton is checked or not
var radiobutton = $("#RadioButton1").is(":checked");
alert(radiobutton);
//Dropdown Selected Vale
var selctedvalue= jQuery("#ddlcountry option:selected").val();
var selctedvalue1 = jQuery("#ddlcountry option:selected").text();
alert(selctedvalue);
alert(selctedvalue1);
// file Uploder
var fluplod = $("#fluplod").css("background-color", "Red");
alert(fluplod);
return false;
var lnkButton = $("#lnkButton").val();
alert(lnkButton);
var P = "Shrawan Kumar Srivastava";
var name = $("#txtName").val(P);
alert(name);
})
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="top">
<h1>Chocolate curry</h1>
<p class="intro">This is my recipe for making curry purely with chocolate</p>
<p class="intro">Ram Used To Class Selector used </p>
</div>
<table class="auto-style1">
<tr>
<td class="auto-style2">
<asp:CheckBox ID="CheckBox1" runat="server" />
</td>
<td>
<asp:CheckBox ID="chkName" runat="server" Checked="false" />
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:DropDownList ID="ddlcountry" runat="server">
<asp:ListItem>A</asp:ListItem>
<asp:ListItem>B</asp:ListItem>
<asp:ListItem>C</asp:ListItem>
</asp:DropDownList>
</td>
<td>
<asp:FileUpload ID="fluplod" runat="server" />
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:Label ID="lblName" runat="server" Text="RamVinay"></asp:Label>
</td>
<td>
<asp:LinkButton ID="lnkButton" runat="server" Text="Lenk Buttom"></asp:LinkButton>
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
</td>
<td>
<asp:Button ID="btnsubmit" runat="server" Text="Click On Ckeck Class selector" />
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:HyperLink ID="hyplink" runat="server">HyperLink</asp:HyperLink>
</td>
<td>
<asp:HiddenField ID="hndfield" runat="server" />
</td>
</tr>
<tr>
<td class="auto-style2" >
<asp:Button ID="btnShow" runat="server" Text="Button" />
</td>
<td class="auto-style2" >
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
*****************************************************************************
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JQuerryTutorials.aspx.cs" Inherits="AjaxApp.JQuerryTutorials" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script type="text/javascript">
//call on page load
$(document).ready(function () {
//button click event
$("#btnShow").click(function () {
//To set label value
var x = "Ram Vinay Singh";
$("#Label1").text(x);
//To set textbox value
var P = "Shrawan Kumar Srivastava";
$("#TextBox1").val(P);
//To set dropdown value
var k = "2";
$("#DropDownList1").val(k);
//To get button text
var button = $("#btnShow").val();
alert(button);
//To get label text
var label = $("#Label1").text();
alert(label);
//To get textbox value
var textbox = $("#TextBox1").val();
alert(textbox);
//To get dropdown value
var dropdown = $("#DropDownList1").val();
var selctedvalue = jQuery("#DropDownList1 option:selected").val();
var selctedvalue1 = jQuery("#DropDownList1 option:selected").text();
alert(dropdown);
alert(selctedvalue);
alert(selctedvalue1);
//To check whether checkbox is checked or not
var checkbox = $("#CheckBox1").is(":checked");
alert(checkbox);
//To check whether radiobutton is checked or not
var radiobutton = $("#RadioButton1").is(":checked");
alert(radiobutton);
//To get the value of Checkboxlist
$(document).ready(function () {
$("#btnShow").click(function () {
var checkboxlist = $('#CheckBoxList1 input[type=checkbox]:checked').each(function () {
alert(checkboxlist);
alert($(this).next().html());
});
})
})
//To get the value of Radiobuttonlist
$(document).ready(function () {
$("#btnShow").click(function () {
var radiobuttonlist = $('#RadioButtonList1 input[type=radio]:checked').val();
alert(radiobuttonlist);
})
})
return false;
})
})
</script>
<style type="text/css">
.auto-style1 {
width: 100%;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="auto-style1">
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>A</asp:ListItem>
<asp:ListItem>B</asp:ListItem>
<asp:ListItem>C</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="CheckBox1" runat="server" />
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="RadioButton1" runat="server" />
</td>
</tr>
<tr>
<td>
<asp:CheckBoxList ID="CheckBoxList1" runat="server">
</asp:CheckBoxList>
</td>
</tr>
<tr>
<td>
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<asp:Button ID="btnShow" runat="server" Text="Show" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<style type="text/css">
.auto-style1 {
width: 100%;
}
.auto-style2 {
}
#top {
background-color: #ccc;
padding: 20px
}
.intro {
color: red;
font-weight: bold;
}
</style>
<script>
$(document).ready(function () {
//alert("hi");
$("#btnShow").click(function () {
// Class Selector Used
$(".intro").css("background-color", "#00FFFF");
//Find Label
var lbl = $("#lblName").text();
var TextName = lbl + " Singh";
alert(TextName);
// Find Button
var btnValue = $("#btnsubmit").val();
alert(btnValue);
//Find CheckBox
var chkVallue = $("#chkName").is(':checked');
alert(chkVallue);
if (chkVallue="true") {
alert("Checkbox is checked.");
}
else if (chkVallue="false") {
alert("Checkbox is unchecked.");
}
//To check whether checkbox is checked or not
var checkbox = $("#CheckBox1").is(":checked");
alert(checkbox);
//To check whether radiobutton is checked or not
var radiobutton = $("#RadioButton1").is(":checked");
alert(radiobutton);
//Dropdown Selected Vale
var selctedvalue= jQuery("#ddlcountry option:selected").val();
var selctedvalue1 = jQuery("#ddlcountry option:selected").text();
alert(selctedvalue);
alert(selctedvalue1);
// file Uploder
var fluplod = $("#fluplod").css("background-color", "Red");
alert(fluplod);
return false;
var lnkButton = $("#lnkButton").val();
alert(lnkButton);
var P = "Shrawan Kumar Srivastava";
var name = $("#txtName").val(P);
alert(name);
})
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="top">
<h1>Chocolate curry</h1>
<p class="intro">This is my recipe for making curry purely with chocolate</p>
<p class="intro">Ram Used To Class Selector used </p>
</div>
<table class="auto-style1">
<tr>
<td class="auto-style2">
<asp:CheckBox ID="CheckBox1" runat="server" />
</td>
<td>
<asp:CheckBox ID="chkName" runat="server" Checked="false" />
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:DropDownList ID="ddlcountry" runat="server">
<asp:ListItem>A</asp:ListItem>
<asp:ListItem>B</asp:ListItem>
<asp:ListItem>C</asp:ListItem>
</asp:DropDownList>
</td>
<td>
<asp:FileUpload ID="fluplod" runat="server" />
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:Label ID="lblName" runat="server" Text="RamVinay"></asp:Label>
</td>
<td>
<asp:LinkButton ID="lnkButton" runat="server" Text="Lenk Buttom"></asp:LinkButton>
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
</td>
<td>
<asp:Button ID="btnsubmit" runat="server" Text="Click On Ckeck Class selector" />
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:HyperLink ID="hyplink" runat="server">HyperLink</asp:HyperLink>
</td>
<td>
<asp:HiddenField ID="hndfield" runat="server" />
</td>
</tr>
<tr>
<td class="auto-style2" >
<asp:Button ID="btnShow" runat="server" Text="Button" />
</td>
<td class="auto-style2" >
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
*****************************************************************************
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JQuerryTutorials.aspx.cs" Inherits="AjaxApp.JQuerryTutorials" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script type="text/javascript">
//call on page load
$(document).ready(function () {
//button click event
$("#btnShow").click(function () {
//To set label value
var x = "Ram Vinay Singh";
$("#Label1").text(x);
//To set textbox value
var P = "Shrawan Kumar Srivastava";
$("#TextBox1").val(P);
//To set dropdown value
var k = "2";
$("#DropDownList1").val(k);
//To get button text
var button = $("#btnShow").val();
alert(button);
//To get label text
var label = $("#Label1").text();
alert(label);
//To get textbox value
var textbox = $("#TextBox1").val();
alert(textbox);
//To get dropdown value
var dropdown = $("#DropDownList1").val();
var selctedvalue = jQuery("#DropDownList1 option:selected").val();
var selctedvalue1 = jQuery("#DropDownList1 option:selected").text();
alert(dropdown);
alert(selctedvalue);
alert(selctedvalue1);
//To check whether checkbox is checked or not
var checkbox = $("#CheckBox1").is(":checked");
alert(checkbox);
//To check whether radiobutton is checked or not
var radiobutton = $("#RadioButton1").is(":checked");
alert(radiobutton);
//To get the value of Checkboxlist
$(document).ready(function () {
$("#btnShow").click(function () {
var checkboxlist = $('#CheckBoxList1 input[type=checkbox]:checked').each(function () {
alert(checkboxlist);
alert($(this).next().html());
});
})
})
//To get the value of Radiobuttonlist
$(document).ready(function () {
$("#btnShow").click(function () {
var radiobuttonlist = $('#RadioButtonList1 input[type=radio]:checked').val();
alert(radiobuttonlist);
})
})
return false;
})
})
</script>
<style type="text/css">
.auto-style1 {
width: 100%;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="auto-style1">
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>A</asp:ListItem>
<asp:ListItem>B</asp:ListItem>
<asp:ListItem>C</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="CheckBox1" runat="server" />
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="RadioButton1" runat="server" />
</td>
</tr>
<tr>
<td>
<asp:CheckBoxList ID="CheckBoxList1" runat="server">
</asp:CheckBoxList>
</td>
</tr>
<tr>
<td>
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<asp:Button ID="btnShow" runat="server" Text="Show" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
No comments:
Post a Comment