Posts

Showing posts from 2014

Error 80043004 solved in windows phone

Hello Guys,                      from last month i was suffering with this error. but today i have solved this error.                      month ago i changed my hotmail id password. so i was getting this error.                    for solve this go to in your xbolx live. and here login again with your new password  and the problem will solve. 

Using comma separated value parameter strings in SQL IN clauses

SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE FUNCTION [dbo].[CSVToTable] (@InStr VARCHAR(MAX)) RETURNS @TempTab TABLE    (id int not null) AS BEGIN     ;-- Ensure input ends with comma SET @InStr = REPLACE(@InStr + ',', ',,', ',') DECLARE @SP INT DECLARE @VALUE VARCHAR(1000) WHILE PATINDEX('%,%', @INSTR ) <> 0 BEGIN    SELECT  @SP = PATINDEX('%,%',@INSTR)    SELECT  @VALUE = LEFT(@INSTR , @SP - 1)    SELECT  @INSTR = STUFF(@INSTR, 1, @SP, '')    INSERT INTO @TempTab(id) VALUES (@VALUE) END RETURN END GO This creates a user function that takes a comma separated value string and converts it into a table that SQL does understand - just pass it the sting, and it works it all out. It's pretty obvious how it works, the only complexity is the REPLACE part which ensures the string is terminated with a single comma by appending one, and removing all double commas from the string. Without

some comman shortcuts

F1 Display Help Ctrl+C Copy the selected item Ctrl+X Cut the selected item Ctrl+V Paste the selected item Ctrl+Z Undo an action Ctrl+Y Redo an action Delete Delete the selected item and move it to the Recycle Bin Shift+Delete Delete the selected item without moving it to the Recycle Bin first F2 Rename the selected item Ctrl+Right Arrow Move the cursor to the beginning of the next word Ctrl+Left Arrow Move the cursor to the beginning of the previous word Ctrl+Down Arrow Move the cursor to the beginning of the next paragraph Ctrl+Up Arrow Move the cursor to the beginning of the previous paragraph Ctrl+Shift with an arrow key Select a block of text Shift with any arrow key Select more than one item in a window or on the desktop, or select text within a document Ctrl with any arrow key+Spacebar Select multiple individual items in a window or on the desktop Ctrl+A Select all items in a document or window F3 Search for a file or folder Alt+Enter Display properties for th

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>                                         <td>                                             <table style="width: 100%; color: Black; font-family: Arial; font-size: 12px; border: 1px solid #9a9a9a;"                                                 cellpadding="5">                                                 <tr>                                                     <td bgcolor="

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.Clear();             GridView2.Rows[0].Cells.Add(new TableCell());             GridView2.Rows[0].Cells[0].ColumnSpan = columncount;             GridView2.Rows[0].Cells[0].Text = "There is no Records ";         }