Click here to Skip to main content
15,909,466 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Licensing Pin
Christian Graus28-Jun-07 14:24
protectorChristian Graus28-Jun-07 14:24 
QuestionPlease Help with passing object from server side to client side Pin
DonVBguy28-Jun-07 10:25
DonVBguy28-Jun-07 10:25 
AnswerRe: Please Help with passing object from server side to client side Pin
Amit Kumar G28-Jun-07 14:20
Amit Kumar G28-Jun-07 14:20 
AnswerRe: Please Help with passing object from server side to client side Pin
Christian Graus28-Jun-07 14:30
protectorChristian Graus28-Jun-07 14:30 
QuestionRe: Please Help with passing object from server side to client side Pin
Amit Kumar G28-Jun-07 14:40
Amit Kumar G28-Jun-07 14:40 
AnswerRe: Please Help with passing object from server side to client side Pin
Christian Graus28-Jun-07 14:57
protectorChristian Graus28-Jun-07 14:57 
QuestionPage_LoadComplete for User Controls Pin
Keith Andersch28-Jun-07 9:28
Keith Andersch28-Jun-07 9:28 
Questionasp buttonfield Pin
boyindie28-Jun-07 8:42
boyindie28-Jun-07 8:42 
Hi
I am trying to create a datagrid with controls bound to each records column, I have made the following declaration for the button

<asp:GridView ID="dataGrid1" runat="server" DataKeyNames="id" >
<Columns>
<asp:ButtonField Text="Delete" buttonType="Button" commandName="Delete" />
</Colummns>
</asp:GridView>

I have also created the necessary subroutine, which should be executed when button is clicked, but i can't get the buttons to run the sub, when i click on them, the sub has the following declaration below

Any Suggestions forum

Thanks in advance
boy

Sub DataGrid1_DeleteCommand(ByVal s As Object, _
ByVal e As DataGridCommandEventArgs)

Dim connectionString As String
connectionString = "Server=lo; uid=; pwd=;database=test;"



Dim conn As MySqlConnection

Dim cmd As MySqlCommand

Dim Id As Integer



Id = CInt(e.Item.Cells(0).Text)



If Id <> Session("CustomerIdToDelete") Then

lbl1.Text = _
"Press the Delete button again if you want to " & _
"delete customer id #" & Id.ToString

Session("CustomerIdToDelete") = Id

Return

End If

Session("CustomerIdToDelete") = -1



conn = New MySqlConnection(connectionString)

cmd = New MySqlCommand("sp_myDelete", conn)

cmd.CommandType = CommandType.StoredProcedure

cmd.Parameters.Add("?sp_Id", SqlDbType.Int).Value = Id



cmd.Connection.Open()

cmd.ExecuteNonQuery()

cmd.Connection.Close()



displayResults()



End Sub

AnswerRe: asp buttonfield Pin
kubben28-Jun-07 8:57
kubben28-Jun-07 8:57 
GeneralRe: asp buttonfield Pin
boyindie28-Jun-07 9:00
boyindie28-Jun-07 9:00 
GeneralRe: asp buttonfield Pin
kubben28-Jun-07 9:05
kubben28-Jun-07 9:05 
GeneralRe: asp buttonfield Pin
boyindie28-Jun-07 9:29
boyindie28-Jun-07 9:29 
GeneralRe: asp buttonfield Pin
kubben28-Jun-07 9:33
kubben28-Jun-07 9:33 
Questionwebservice - copy file to remote server Pin
Dpriya28-Jun-07 8:36
Dpriya28-Jun-07 8:36 
AnswerRe: webservice - copy file to remote server Pin
kubben28-Jun-07 8:56
kubben28-Jun-07 8:56 
QuestionHow to called server side function on onblur event of textbox Pin
rahul.net1128-Jun-07 5:58
rahul.net1128-Jun-07 5:58 
AnswerRe: How to called server side function on onblur event of textbox Pin
kubben28-Jun-07 9:01
kubben28-Jun-07 9:01 
AnswerRe: How to called server side function on onblur event of textbox Pin
Schatak24-May-11 1:14
professionalSchatak24-May-11 1:14 
QuestionASP Menu Item Pin
gavthegenius28-Jun-07 5:48
gavthegenius28-Jun-07 5:48 
AnswerRe: ASP Menu Item Pin
martin_hughes28-Jun-07 7:29
martin_hughes28-Jun-07 7:29 
QuestionSystem Information Pin
oskardiazdeleon28-Jun-07 5:41
oskardiazdeleon28-Jun-07 5:41 
QuestionnLog Help needed Pin
Ridge Howison28-Jun-07 5:26
Ridge Howison28-Jun-07 5:26 
Questiondelete confirm in datagrid with vb asp.net Pin
DonVBguy28-Jun-07 4:56
DonVBguy28-Jun-07 4:56 
AnswerRe: delete confirm in datagrid with vb asp.net Pin
Fred_Smith28-Jun-07 7:42
Fred_Smith28-Jun-07 7:42 
GeneralRe: delete confirm in datagrid with vb asp.net Pin
DonVBguy28-Jun-07 10:21
DonVBguy28-Jun-07 10:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.