Archive for December, 2009

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