Good morning... Enjoy Sunday everyone
Niact
Perform with Passion & Commitment to Surpass our Goals. Celebrate Success & Recognise Outstanding Achievement.
NIACT was set up in 2010, with primary goal of provideing Quality Training in the field of Information Technology ,and to help the nascent IT industry overcome its human resource challenges. Act with Integrity, Ethics & Honesty
Treat Everyone with Respect
Succeed through Teamwork.
Happy new year to all mates
Hi everyone.. Hoping all are doing well.
23/02/2012
NIACT
happy voting Day.
Jquery Ajax
PLease note that you need to download a jquery.js file
-----------------------------------Ajax.aspx page
$(document).ready(function () {
$(" ").click(function ()
{
$.ajax
(
{
url: "ajax1.aspx?function=getrecords&details=" + $(" ").val() + "&rand=" + Math.random(),
success: function (data) {
$(" ").html(data);
}
}
);
});
})
-----------------------------------------------------
Ajax.cs file
----------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class ajax : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
-----------------
------- Ajax1.aspx page
--------------------------------------
------------------------Ajax1.cs -----------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data.SqlClient;
public partial class ajax1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
details();
}
public void details()
{
string function = Request.QueryString["function"];
switch (function.ToLower())
{
case "getrecords":
recorddetails();
break;
}
}
public void recorddetails()
{
string customerId = Request.QueryString["details"];
SqlConnection con = new SqlConnection("Data Source=Localhost;Initial Catalog=ganesh;User Id=sa;Password=master");
con.Open();
SqlCommand com = new SqlCommand("Select * from employee Where id=" + customerId, con);
SqlDataReader oReader = com.ExecuteReader();
bool blnFound = false;
StringBuilder Data = new StringBuilder();
if (oReader.HasRows)
{
while (oReader.Read())
{
blnFound = true;
Data.Append("");
Data.Append("");
Data.Append("Name");
Data.Append("" + Convert.ToString(oReader["Fname"]) + "");
Data.Append("");
Data.Append("");
Data.Append("Address");
Data.Append("" + Convert.ToString(oReader["City"]) + "");
Data.Append("");
Data.Append("");
}
}
else
{
Data.Append("");
Data.Append("");
Data.Append("Customer not found");
Data.Append("");
Data.Append("");
Data.Append("");
}
Response.Write(Data.ToString());
}
}
----------------------------------
Guyzz Set yourself for projectss..
Jyot se jyot jagete chalo, Prem ki Ganga bahate chalo
Rah me aaye jo din dukhi sab ko gale se lagete chalo.
Din Aayega sabka Sunehra. Isliye meri aur se happy dassara.
eid mubarak ............
Humara BHARAT mahaan....??
Ek Desh jahaa Pizza, Ambulance ke pehele ghar pahuchta hai...
Jahaa Car Loan 7% hai or Education Loan 12%...
Jahaa Chawal Rs.40/kg me milta hai or Sim Card FREE...
Jahaa log Durga ki Pooja karte hai or Ladki paida hone pe uska KHOON...
Jahaa Olympic shooter ko Swarna padak jitne pe Sarkar 3.Crore deti hai or Dusra shooter jo Aataankwadi se ladte SHAHID hota hai usey kuch b nahi...
Sach mai humara BHARAT mahaan hai......
*HAPPY INDEPENDENCE*
No lecture on Friday 5th Aug for 7-9 batch
Click here to claim your Sponsored Listing.
Location
Category
Website
Address
RN/11, 236 Khawse Lane, Khar Danpada, Khar West
Mumbai
PIN-400052
Opening Hours
| Monday | 10am - 8pm |
| Tuesday | 10am - 8pm |
| Wednesday | 10am - 8pm |
| Thursday | 10am - 8pm |
| Friday | 10am - 8pm |
| Saturday | 10am - 8pm |
| Sunday | 10am - 8pm |