Sql Data Srouce Control Deleting Data From Database Apr 30, 2008 Hey guyz today i will show you how to fire delete query by using our beloved control sqldatasource. Here is the code 1 2 3 4 5 SqlDataSource myDbSource22 = new SqlDataSource(); myDbSource22.ConnectionString = ConfigurationManager.ConnectionStrings["lalConnectionString"].ConnectionString; myDbSource22.ProviderName = "System.Data.SqlClient"; myDbSource22.DeleteCommand = "delete from ProductsGroups where pid = " + productId; myDbSource22.Delete(); All it does it deletes all the rows for a given productID from table productgroups. Simple right ;)
Sql Data Srouce Control Fetch data from database Apr 30, 2008 Hi in asp.net 2.0 this new datasource control has been added and i liked it alot and i used it on many places so i thought it would be nice if I share my knowledge with all my readers so first of all i would just like to show you how to retrieve some data from your database into C# code behind file. 1 2 3 4 5 6 7 8 9 10 11 12 13 string userID = string. ...
Sql Data Srouce Control Inserting Data Into Database Apr 30, 2008 hey guyz how are you ?? Me back with my sqldatasource series. Today i will show you how to fire insert query using sqldatasource control into code behind i am using c#. Below is the sample code UserID is the parameter passing into a function as an argument. 1 2 3 4 5 6 7 8 9 10 11 12 13 DateTime Entrydate = DateTime.Today; SqlDataSource myDbSource = new SqlDataSource(); myDbSource. ...
Sql Data Srouce Control Updating Data From Database Apr 30, 2008 hey guyz finally we have to learn how to update our tables in database so only for you guys here is my sample code 1 2 3 4 5 6 7 string giftId = GridView1.SelectedRow.Cells[0].Text.ToString(); //getting an id SqlDataSource myDbSource = new SqlDataSource(); myDbSource.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; //myDbSource.InsertCommand = "update gifts set giftActivate=1 where giftId=" + Entrydate + ")"; myDbSource.UpdateCommand = "update gifts set giftActivate='1' where giftId=" + giftId; myDbSource. ...
Fedora Core6 spoofing mac address Apr 30, 2007 hi Guyz i am writing this post while using fedora core 6 live cd and it took 2 hours to make internet working on this live distro. I have acer 1642ZNWLCi with 1.7 ghz, 512 mb, and 60 gb HDD. I have a cabel connection and my cabel operator is keepig record of my mac address and only one mac address is allowed so to run internet on all my pc i have to spoof mac addresss. ...
Finally I Have My Own Domain Apr 30, 2007 Hi guyz, After many days I am back and back for good :) recentlly i purchased a domain name and hosting package, so that i can have my own website and I want my settings persistent which was not possible in the case of free hosting like in my case my hosting provider remove the mysql database support. Can’t tell you how happy I am after getting my website up and running its currently in beta state I will design it from scratch as time permits and planning to use table less design. ...
How to enable full multimedia capabilities on Suse 10.2 Apr 30, 2007 NOTE: The package manager in Suse 10.2 appears to be working a lot better than the one in 10.1, so this time we will be using YAST and not SMART to install the required packages. The first step in resolving the multimedia issue is to setup additional YAST software sources. The software repositories used in this howto, are Packman and Guru. If possible, please use a mirror instead of the main download site to prevent overloading one download location. ...
How to get directory name of the page currently displaying Apr 30, 2007 If you want to know only the directory name not the full path of the page that is currently displaying you can use this code 1 2 3 4 string sPath = System.Web.HttpContext.Current.Request.Url.AbsolutePath; System.IO.FileInfo oInfo = new System.IO.FileInfo(sPath); string sRet = oInfo.Directory.Name.ToString(); Response.Write("<br><br>Directory name===" + sRet + "<br><br>"); Happy Coding Najam Sikander Awan
How to get pagename of itself Apr 30, 2007 If you want to display the filename or page name of the current displaying page just use these two lines and it will show only the filename like default.aspx, najam.aspx or indexas.aspx no matter it these pages are located deep into your site structure. 1 string pagename = System.IO.Path.GetFileName(Request.ServerVariables["SCRIPT_NAME"]); Response.Write(pagename); Enjoy coding Najam Sikander Awan
Oh God Hd audio driver for linux Apr 30, 2007 hi guyz; Well after solving problem for my lan card through mac spoofing next problem that I want to solve now is making sound work on my acer laptop while running fedore core 6 live cd. Now as i inspect my hardware i get to know that i have a realtek sound card that has hd audio codec Alc 883 now. to check if your hardware is detected by linux or not you have to run following command in shell ...