Solved

Datatable reset

Posted on 2011-03-03
2
347 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
2 Comments
 
LVL 13

Accepted Solution

by:
agarwalrahul earned 500 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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