Posts

nested girdview in datalist cancel update delete c#

  <asp:DataList ID="datalist1" Width="100%" DataKeyField="level2taskno" runat="server"                             OnItemDataBound="datalist_ItemDataBound">                             <HeaderStyle HorizontalAlign="Center"></HeaderStyle>                             <ItemTemplate>                                 <table style="width: 100%; color: Black; font-family: Arial; font-size: 12px;" cellspacing="0">                                     <tr>                                   ...

Getting Client Ip address and computer name in c#

 using system .net;  /* host address */             string strHostName = System.Net.Dns.GetHostEntry(Request.UserHostAddress).HostName;             lblip.Text = Request.UserHostAddress.ToString(); when you upload your code on server then in website you'll get your exact value.

Insert new row in gridview when no data in gridview

 sql = "select * from tblbkdetails where formid='" + formid + "'";         ds = SqlHelper.ExecuteDataset(Cnn, CommandType.Text, sql);         //grdshow.DataSource = ds.Tables[0];         //grdshow.DataBind();         if (ds.Tables[0].Rows.Count > 0)         {             GridView2.DataSource = ds.Tables[0];             GridView2.DataBind();         }         else         {             ds.Tables[0].Rows.Add(ds.Tables[0].NewRow());             GridView2.DataSource = ds;             GridView2.DataBind();             int columncount = GridView2.Rows[0].Cells.Count;             GridView2.Rows[0].Cells.Cl...

How can i disable autocorrect function on Windows Phone 7.5

Hello Guys,                lots of time when i am chatting with my friends, then m using some Hindi words but auto-complete function replace some words with English words. so i was very disappoint with the facilities . so now m going to telling you how can you solved this problem. just go into your setting>>Keyboard>>typing settings>>press to change>>uncheck Correct Misspelt words. i hope it'll be a very userfull for you...

C# - Generics

Generics allow you to delay the specification of the data type of programming elements in a class or a method, until it is actually used in the program. In other words, generics allow you to write a class or method that can work with any data type. You write the specifications for the class or the method, with substitute parameters for data types. When the compiler encounters a constructor for the class or a function call for the method, it generates code to handle the specific data type. A simple example would help understanding the concept: using System; using System.Collections.Generic; namespace GenericApplication {     public class MyGenericArray<T>     {         private T[] array;         public MyGenericArray(int size)         {             array = new T[size + 1];         }         public T getItem(int index)...

Design Tip #107 Using the SQL MERGE Statement for Slowly Changing Dimension Processing

Most ETL tools provide some functionality for handling slowly changing dimensions. Every so often, when the tool isn’t performing as needed, the ETL developer will use the database to identify new and changed rows, and apply the appropriate inserts and updates. I’ve shown examples of this code in the Data Warehouse Lifecycle in Depth class using standard INSERT and UPDATE statements. A few months ago, my friend Stuart Ozer suggested the new MERGE command in SQL Server 2008 might be more efficient, both from a code and an execution perspective. His reference to a blog by Chad Boyd on MSSQLTips.com gave me some pointers on how it works. MERGE is a combination INSERT, UPDATE and DELETE that provides significant control over what happens in each clause. This example handles a simple customer dimension with two attributes: first name and last name. We are going to treat first name as a Type 1 and last name as a Type 2. Remember, Type 1 is where we handle a change in a dimension attribute...

DNS Server is not responding on Windows 7

Image
When you try to connect to the Internet, the connection might fail when we run the Troubleshooter and you might get this error:   The device or resource (DNS server) is not responding. DNS Server is not responding In such a scenario, there are few things you could try to resolve it. 1.       First backup your Router settings and update the Firmware of your Router. Check the Router manual for more information 2.       Next thing is to change the DNS server address manually. Go to Start and Click on Control Panel Open up Network and Internet and go to the Network and Sharing Center. Click on Change adapter settings Now you’ll see the list of Network adapters select the Network adapter  that your using and right click on it and go to properties Then Click on “Internet Protocol Version 4 (TCP/IPv4)” You’ll see the Internet Protocol Properties Select “Use the Following DNS server address:” Enter the...