Programming

VB.NET: How to implement Group By in DataSet using LINQ

In this post I will show you the power of LINQ. At first I never try LINQ even when I developing project using Visual Studio 2008. But since I have no way to find a solution to one of my project, I start to explore LINQ which is give me a thought of how powerful and simple it become when doing a coding using LINQ.
Read the rest of this entry »

  • Share/Bookmark

ASP.NET: How to read XML Data String to Dataset


The output of XML String:

<?xml version="1.0" encoding="utf-8" ?>
- <NewDataSet>
- <Table>
 <CONDOM>Durex</CONDOM>
 <SIZE>XL</SIZE>
 <QTY>123</QTY>
 <COLOR>616</COLOR>
 </Table>
 </NewDataSet>

In order to convert from XML to dataset, this is the code:
Read the rest of this entry »

  • Share/Bookmark

ASP.NET: Convert String XML to XML Node

For example I have string value like this:

    <?xml version="1.0"?>
           <Product type="Condom">
                <CondomName>durex</CondomName>
                <ExpDate>False</ExpDate>
                <Type>False</Type>
                <Color>False</Color>
                <Qty>False</Qty>
            </Product>

Since this this is a string value, so we need to convert to xml node to be able to process.
So this is the code:
Read the rest of this entry »

  • Share/Bookmark

ASP.NET: How to use Javascript alert inside AJAX UpdatePanel

Normally when we add Javascript Alert to our asp.net it will be like this:
Page. ClientScript.RegisterStartupScript(this.GetType(), "winPop", "alert('Update is successful')
but this code is not working if you using the code inside update panel.
So in order to add javascript in update panel you need to register you client script to your script manager as shown below:
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), Guid.NewGuid().ToString(), "alert('Update is successfu.');",True)


  • Share/Bookmark

SSIS: Update data from different table if data is Null

SSIS: SSIS stands for SQL Server Integration Services. It is the new data transformation standard for SQL Server 2005 and has replaced the old SQL Server Data Transformation Services.

In this post, I want to show how to update data from different table with condition that the data is Null.
Read the rest of this entry »

  • Share/Bookmark

ASP.NET – Convert CSV to Dataset

In this post I will show you how to convert from .csv files to dataset in ASP.NET
Read the rest of this entry »

  • Share/Bookmark

ASP.NET Cross Tab / Pivot from Data Table

Sometimes when you working with the large data, you might want to display the data in pivot table / cross tab. Crystal report have a very nice wizard to make our life easier to create cross tab, but not in vb.net

For example you have data table like Table CompanyDetail populated from the SQL Select Query below
Read the rest of this entry »

  • Share/Bookmark

Create Multiple row / group header in gridview ASP.NET

This article shows how to create multiple row / group header in gridview asp.net

group header

first you need to add gridview to database and set the datasource connection.
After you have done with all of that, you just add this function to your code
Read the rest of this entry »

  • Share/Bookmark

Connecting asp.net to Sql server 2005 stored procedures into dataset

This article demonstrates how to use ASP.NET and ADO.NET with Visual Basic .NET to create and to call a Microsoft SQL Server stored procedure with an input parameter and an output parameter.

1 step create store procedure


Create Procedure GetAuthorsByLastName1 (@au_lname varchar(40), @RowCount int output)
as

select * from authors where au_lname like @au_lname;

/* @@ROWCOUNT returns the number of rows that are affected by the last statement. */
select @RowCount=@@ROWCOUNT

Call the stored procedure in asp.net code
Read the rest of this entry »

  • Share/Bookmark