Solved

Datalist and e.commandName

Posted on 2010-09-15
1
603 Views
Last Modified: 2012-06-22
Hello,

My datalist allows to edit, update and insert records.

After executing update command on my datalist, if I press F5 on web browser and load page again,  then function ItemCommand and method  Make_Update() are called again.

Is there any way to reset e.CommandName value, so if page is refreshed with F5, then method Make_Update() is not called?
Protected Sub Datalist_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles DataList.ItemCommand



        If e.CommandName = "update" Then

          '' If page is refreshed with F5, then Make_Update() is called again

            Make_Update()

            DataList.EditItemIndex = -1

            Load_Data()

        End If



    End Sub

Open in new window

0
Comment
Question by:miyahira
1 Comment
 
LVL 41

Accepted Solution

by:
guru_sami earned 400 total points
ID: 33686067
that is a PostBack issue. Check the discussion below and one solution provided is to Refresh the Page by redirecting to itself after your ItemCommand execution:

http://forums.asp.net/p/1184197/2140819.aspx
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

12 Experts available now in Live!

Get 1:1 Help Now