Solved

Datatable reset

Posted on 2011-03-03
2
335 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now