I'm using VS 2008 with SP1...
For many, VS2008 is the best IDE for a programmers, but sometimes...
I was working with a GridView (previous post) and I had to change the name of a LinkButton from "Delete" to "Eliminate" a simple operation you could say... I also thought!
Unfortunately is not maintained the new "Text" property!
This problem does not exist with normal "Button", the property "Text" seems to work with this control and with the same conditions...
To perform the change, we need to go to the html source...
Saturday, November 29, 2008
Another bug in Visual Studio 2008 ?
by Michele 0 Comments
Etichette: Visual Studio 2008
Friday, November 28, 2008
How to... use an Ajax ConfirmExtender in a GridView
A typical case to use an ajax-confirmbutton within a gridview is to delete a row on DB, let's take a look...
So, in our gridview, we have to create an "ItemTemplate", then add a LinkButton and the ajax ConfirmButtonExtender.
Set the property of our Extender like "TargetContolId" (= the LinkButton ID) and the "Confirm Text" (= Are You sure, continue?).
In this way we have connected the extender with the LinkButton !
Now we must connect the LinkButton with the data from the source (DataTable-method or a Control DataSource) in particular with an unic "row-ID"
Then go to Click-Event of the LinkButton to add the code to delete the row on DB...
something like:
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
'delete after Ajax-ConfirmButtonExtender
Dim lb As LinkButton = sender
Dim objDel As New clSessionTest(("ConnectionString"))
objDel.EliTempTest(lb.CommandArgument)
objDel = Nothing
End Sub
by Michele 0 Comments