Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Datatable reset

Posted on 2011-03-03
2
Medium Priority
?
381 Views
Last Modified: 2012-05-11
When pageload the first time, it looks fine. The second time, it keeps adding "- test" to column_tmp. How can I reset my_table the second time it reload?
pageload

my_table is datatable


 

For Each column As DataColumn In my_table.Columns

                Dim column_tmp As String = column.ColumnName
                Dim RequestAs String = Get_data(Session("test"), column_tmp)

                If RequestIsNot Nothing Then
                    my_table.Columns(column_tmp).ColumnName = Request_columnname
                   
                Else
                 
                    my_table.Columns(column_tmp).ColumnName = column_tmp &  " - test"
                           
                End If
Next
0
Comment
Question by:VBdotnet2005
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
Rahul Agarwal earned 2000 total points
ID: 35033605
You Session("test") Expires every page load please check this and to reset datatable use DataTable.Reset() command.
0
 

Author Comment

by:VBdotnet2005
ID: 35033693
Can I do this?
Dim my_table as datatable
my_table.reset()
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question