about 1 year ago - No comments
Today from a blog I discovered this project called ELMAH: Error Logging Modules and Handlers by the name you can guessed by now what it does and let me tell you it does it very well. After reading a tutorial ELMAH plugged into my asp.net 3.5 test project and working good. I really liked it
about 1 year ago - No comments
Hello guys, This is my first Bll class that is using linq and returning objects to presentation layer. Main data component class is ItemsDT which contain another skeleton class “ItemGridView” for custom view of items data table. “ItemGridView” contains basically have the fields that i want to show in my presentation layer. Note that items
about 1 year ago - No comments
hi guys, Well I like to share one more experiment with you that is how to call a webservice from your javascript(jquery). For that again you need to have an asp.net ajax enable website. Lets first examine what are the requiments for webservice if we need to call it from javascript well after having asp.net
about 1 year ago - No comments
Hi guyz, Today I am sharing how to call asp.net web page code behind methods from client side javascript in my case it will be jquery. Let us divide this into two parts the server side and client side on server side we have to write a function or page method. [WebMethod] public static string
about 2 years ago - No comments
hey guyz finally we have to learn how to update our tables in database so only for you guys here is my sample code 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
about 2 years ago - 1 comment
Hey guyz today i will show you how to fire delete query by using our beloved control sqldatasource. Here is the code 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
about 2 years ago - 1 comment
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. DateTime Entrydate = DateTime.Today; SqlDataSource myDbSource =
about 2 years ago - No comments
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
about 2 years ago - 3 comments
hi guyz Sorry for writing after such a long time i guess i am very busy now a days so for a project i needed to read my smtp email settings defined in my web.config file so after some efforts i am able to read these settings direct from my system .net section. System.Configuration.Configuration config
about 2 years ago - No comments
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 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