Posts

Detailed Table using jQuery

Image
We have seen in many sites regarding detailed information of products below the row when we click on the downwards arrow and collapse when click on upwards arrow. We have many plugin's for this type of functionality we can also do with jQuery simple logic also. I have done some R&D regarding this and want to share information of detailed table using jQuery. We need to download the latest jQuery File from this link http://jquery.com/download/ We have many CDN links also available for directly accessing the jQuery library files. Google : https://developers.google.com/speed/libraries/devguide#jquery Micro-soft : http://www.asp.net/ajaxlibrary/cdn.ashx Git-hub: https://github.com/jquery/jquery

How to use constants in .NET?

I have a written this Dev tip for the new folk who entered in this Dev World. Normally in the development we use some of the success message's or failure messages in general common message's.We do have a habit of writing the messages as given below MessageBox.Show("Successfully created a record!"); MessageBox.Show("Successfully deleted a record!"); We can make use of Constants in .NET which will be declared using the keyword " const ".For the above scenario we can create a  class like "Messages.cs" and define constants as given below  public class Messages     {         public const string strUserExist = "User Name already exists.";         public const string strUserSaved = "User information saved successfully.";         public const string strUserDeleted = "User deleted successfully.";         } ...

Difference between Debug and Release Modes in Visual Studio

Difference between Debug and Release Modes in Visual Studio We have two options to build a application in production or development stage.Both have their own importance's and characteristics . Debug :Developer use debug mode for debugging the web application on live/local server.Debug mode stores debug information so it takes time to execute.We can use F10,F11 function keys as well keep tracking the break point.In debug mode the *.pdb (Program debug database) file will be created which contains the debug steps in the binary format.Less optimized code. Release : We can't do the debug in this mode ,hence no chance of creating *.pdb file.Scripts & images downloaded by webresource.axd are cached.It has small size, and runs fast.More optimized code. I hope this information could help folks. Happy coding :-)

Get the SQL Server Information from Query

Some times we need to get the information of the SQL Server where it is installed. Simply we can get the info from Query also -- Get the version info select @@version We have a in-built stored procedure called 'xp_msver' to the Server information. -- Get the Server Information exec xp_msver This is a basic information provided but may be useful to the SQL Server learners . Good day :-)

How to update Row which is not having Primary Key?

We all find some different scenario where the table has no primary key column and need to update the records having same data. For this type of scenario's we need to update the particular column based on some Unique value.In SQL Server we have a option called " ROW_NUMBER() " .Every one know about Row_Number() I will present a brief intro about this. ROW_NUMBER():   ROW_NUMBER to find the Row number of a particular column if its specified in orderby Clause.It has the following syntax  Syntax: select  row_number() over (order by name) as ROWNumber, Name from sys.all_objects order by name  For more details about the R OW_NUMBER() refer this MSDN .   Here I will present a example query to update a table which has no primary key and having same data for few rows . WITH Record AS (select  row_number() over (order by [columnName]) as ROWNumber, Name from sys.all_objects order by name )  UPDATE Record set [col1]=@col1,[co...

Programmatically Zip and UnZip the files in .NET

Normally we may find the functionality to Zip and Unzip the file pro grammatically.We have many third party components to do this operation.Here I am going to present Zip and Unzip files using "CGZipLibrary.dll" in C#.NET. To do this we need to download the CGLibrary.dll from this link and register this dll. The zip file contains 3 DLL's: CGZipLibrary.dll zip32.dll Unzip32.dll Open the command prompt in administrator mode.Now we need to register this CGZipLibrary.dll as given below regsvr32 filepath\filename Ex : regsvr32 D:\Download\CGLibrary.dll After registering the dll and Copy zip32.dll and unzip32.dll to c:\windows\system32 directory or c:\winnt\system32. Unzip the file you need to do like this            string SrcPath = @"D:\StudentReports.zip";             string DestPath = @"D:\ZippedFiles";          ...

Bind the Events to the Dynamically Created Rows in a HTML Table

I found a solution to bind the events to the dynamically created buttons in a HTML.Some times we need to add a row to the existing HTML table with some inputs.That dynamically created row is not visible in the page source.Try It ! So to attach the events also we need to do like this var newRow = " <tr> <td></td> <td><input type='text' id='tbNameDyn'/></td> <td> <input type='text' id='tbAgeDyn'/>< /td> <td><input type='checkbox' id='tbResultDyn'/></td> <td > <input type='submit' name='submitButton' value='Save Row' id='btnSaveRowDyn' onclick='DynButtonClick();'> </td></tr> " ; // $('#webgrid > tbody:last'). $ ( '#webgrid tbody:last' ) . append ( newRow ) ; Here I have binded the button with the event "onClick" function ...