Click here to Skip to main content
15,915,019 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionto know what are methods that loaded when page is loaded Pin
chinnivinay12-Nov-06 16:48
chinnivinay12-Nov-06 16:48 
QuestionComplex and Interesting DataGrid Dynamic Control problem Pin
anshubansal12-Nov-06 16:08
anshubansal12-Nov-06 16:08 
QuestionSkins and CSS in ASP.NET 2.0. I am completely confused! Pin
shapper12-Nov-06 14:07
shapper12-Nov-06 14:07 
Questionasp.net application configuration - setting up roles and membership Pin
Guy Harwood12-Nov-06 11:24
Guy Harwood12-Nov-06 11:24 
AnswerRe: asp.net application configuration - setting up roles and membership Pin
Guy Harwood14-Nov-06 1:37
Guy Harwood14-Nov-06 1:37 
QuestionC# and ASP.NET Pin
mough12-Nov-06 4:39
mough12-Nov-06 4:39 
Questioncheck Box List and SelectedValue prob.? [modified] Pin
Naif_Prof12-Nov-06 3:59
Naif_Prof12-Nov-06 3:59 
QuestionEvent problem Pin
shapper12-Nov-06 3:56
shapper12-Nov-06 3:56 
Hello,

I have a custom control where I have a button.
I need to raise the event FormSubmited after all the code, in
Button_Click, is finished.

The problem is when I check FormSubmited in my page nothing happens:

Private Sub Form_FormSubmited(ByVal sender As Object, ByVal e As
EventArgs) Handles Form.FormSubmited
Response.Write("For Was Submited")
End Sub

My custom control code is as follows:
...
Public Class Contact
Inherits WebControl

Private Sub bSubmit_Init(ByVal sender As Object, ByVal e As
System.EventArgs)
.....
End Sub

Private Sub bSubmit_Click(ByVal sender As Object, ByVal e As
System.EventArgs)

' SOME CODE

' Raise the OnFormSubmited event
RaiseEvent FormSubmited(Me, EventArgs.Empty)

End Sub

Public Event FormSubmited As EventHandler
Protected Overridable Sub OnFormSubmited(ByVal e As EventArgs)
RaiseEvent FormSubmited(Me, e)
End Sub

Protected Overrides Sub CreateChildControls()

AddHandler bSubmit.Init, AddressOf bSubmit_Init
AddHandler bSubmit.Click, AddressOf bSubmit_Click
MyBase.Controls.Add(bSubmit)

End Sub

End Class

Could someone tell me what am I doing wrong here?

Thanks,
Miguel
AnswerRe: Event problem Pin
CWIZO12-Nov-06 11:17
CWIZO12-Nov-06 11:17 
GeneralRe: Event problem Pin
shapper12-Nov-06 12:17
shapper12-Nov-06 12:17 
Question<form> on masterpage and user controls Pin
moazzamahmed11-Nov-06 20:35
moazzamahmed11-Nov-06 20:35 
AnswerRe: <form> on masterpage and user controls Pin
Guffa12-Nov-06 0:33
Guffa12-Nov-06 0:33 
GeneralRe: <form> on masterpage and user controls Pin
moazzamahmed13-Nov-06 11:52
moazzamahmed13-Nov-06 11:52 
QuestionInserting line numbers Pin
sudidela11-Nov-06 19:02
sudidela11-Nov-06 19:02 
QuestionGenerics & ViewState Pin
eggie511-Nov-06 17:41
eggie511-Nov-06 17:41 
AnswerRe: Generics & ViewState Pin
aamironline12-Nov-06 1:58
aamironline12-Nov-06 1:58 
Questionwhat is the opposite action for Fill(dataset) Pin
karanba11-Nov-06 14:48
karanba11-Nov-06 14:48 
AnswerRe: what is the opposite action for Fill(dataset) Pin
Guy Harwood12-Nov-06 11:18
Guy Harwood12-Nov-06 11:18 
Questionclosing a connection Pin
karanba11-Nov-06 14:01
karanba11-Nov-06 14:01 
AnswerRe: closing a connection Pin
Guffa11-Nov-06 14:21
Guffa11-Nov-06 14:21 
GeneralRe: closing a connection Pin
karanba11-Nov-06 14:49
karanba11-Nov-06 14:49 
QuestionPicture Gallery with paging Pin
mehrdadc4811-Nov-06 10:59
mehrdadc4811-Nov-06 10:59 
AnswerRe: Picture Gallery with paging Pin
karanba12-Nov-06 1:38
karanba12-Nov-06 1:38 
GeneralRe: Picture Gallery with paging Pin
kumarrani55529-Oct-12 21:56
kumarrani55529-Oct-12 21:56 
Questionweb.config Pin
neojapanese11-Nov-06 6:58
neojapanese11-Nov-06 6:58 

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.