Click here to Skip to main content
15,886,693 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionProblem in connection with sql server 2005 from vs2005 Pin
Dyuri30-Apr-08 17:22
Dyuri30-Apr-08 17:22 
AnswerRe: Problem in connection with sql server 2005 from vs2005 Pin
Christian Graus30-Apr-08 17:32
protectorChristian Graus30-Apr-08 17:32 
QuestionLearning ASP.Net Pin
jds120730-Apr-08 15:50
jds120730-Apr-08 15:50 
AnswerRe: Learning ASP.Net Pin
AlexeiXX330-Apr-08 16:19
AlexeiXX330-Apr-08 16:19 
AnswerRe: Learning ASP.Net Pin
Tad McClellan30-Apr-08 17:09
professionalTad McClellan30-Apr-08 17:09 
AnswerRe: Learning ASP.Net Pin
Christian Graus30-Apr-08 17:31
protectorChristian Graus30-Apr-08 17:31 
AnswerRe: Learning ASP.Net Pin
Vasudevan Deepak Kumar2-May-08 2:02
Vasudevan Deepak Kumar2-May-08 2:02 
QuestionAJAX server control not throwing events Pin
Tad McClellan30-Apr-08 12:38
professionalTad McClellan30-Apr-08 12:38 
So I've been looking at this for 2 days now. I've created a simple custom control, a button to fill a lable with the current time from the server. I've tried to inherit updatepanel and I've tried updatepanel as a composit control but no luck. I click on the button and nothing happens.

Here is the code if you think you can set me straight...

Imports System.Web<br />
Imports System.Web.UI<br />
Imports System.Web.Script.Serialization<br />
Imports System.Web.UI.WebControls<br />
<br />
<br />
Public Class FormFooter<br />
    Inherits WebControl<br />
    Implements IPostBackEventHandler<br />
 <br />
    Public Event Click As EventHandler<br />
    Private _SM As ScriptManager<br />
  <br />
<br />
 <br />
    Protected Overrides Sub CreateChildControls()<br />
<br />
<br />
        MyBase.CreateChildControls()<br />
        Dim parent As Control<br />
        Dim container As Control<br />
        If SM Is Nothing OrElse Not SM.EnablePartialRendering Then<br />
<br />
            container = New Control<br />
            parent = New Control<br />
<br />
<br />
        Else<br />
<br />
<br />
<br />
<br />
            Dim up As UpdatePanel = New UpdatePanel<br />
            up.ID = "UpPan2"<br />
            Dim trigger As AsyncPostBackTrigger = New AsyncPostBackTrigger()<br />
<br />
            trigger.ControlID = ClientID<br />
            trigger.EventName = "Click"<br />
<br />
            up.Triggers.Add(trigger)<br />
            container = up.ContentTemplateContainer<br />
            parent = up<br />
        End If<br />
<br />
        Dim cmdUpdate As Button<br />
        Dim lblUpdate As Label<br />
        lblUpdate = New Label<br />
        lblUpdate.ID = ClientID & "$txtTime"<br />
        lblUpdate.Text = " N O W"<br />
<br />
<br />
        cmdUpdate = New Button<br />
        cmdUpdate.Text = "Add Time"<br />
        cmdUpdate.ID = ClientID & "$cmdUpdate"<br />
<br />
<br />
        container.Controls.Add(lblUpdate)<br />
<br />
        container.Controls.Add(cmdUpdate)<br />
<br />
<br />
        Controls.Add(parent)<br />
<br />
<br />
    End Sub<br />
    Private ReadOnly Property SM() As ScriptManager<br />
        Get<br />
            If _SM Is Nothing Then<br />
                _SM = ScriptManager.GetCurrent(Page)<br />
            End If<br />
            Return _SM<br />
        End Get<br />
    End Property<br />
<br />
<br />
   <br />
<br />
    Public Sub RaisePostBackEvent(ByVal eventArgument As String) Implements System.Web.UI.IPostBackEventHandler.RaisePostBackEvent<br />
        Select Case eventArgument<br />
            Case "click"<br />
                OnClick(New EventArgs)<br />
        End Select<br />
    End Sub<br />
    Protected Sub OnClick(ByVal e As EventArgs)<br />
        SM.RegisterDataItem(Me, "<h3>Sending data from click3</h3>")<br />
        RaiseEvent Click(Me, e)<br />
<br />
    End Sub<br />
<br />
<br />
End Class



QuestionCrystal Report Pin
sabaMCA30-Apr-08 10:52
sabaMCA30-Apr-08 10:52 
QuestionHow to catch page not found error when redirecting Pin
DotNetXenon30-Apr-08 8:42
DotNetXenon30-Apr-08 8:42 
AnswerRe: How to catch page not found error when redirecting Pin
Blue_Boy30-Apr-08 10:31
Blue_Boy30-Apr-08 10:31 
AnswerRe: How to catch page not found error when redirecting Pin
Sankar Komma 30-Apr-08 10:41
Sankar Komma 30-Apr-08 10:41 
Question[c#] read a table from a web page Pin
Joshua8230-Apr-08 8:22
Joshua8230-Apr-08 8:22 
AnswerRe: [c#] read a table from a web page Pin
Christian Graus30-Apr-08 10:51
protectorChristian Graus30-Apr-08 10:51 
AnswerRe: [c#] read a table from a web page Pin
Colin Angus Mackay30-Apr-08 13:56
Colin Angus Mackay30-Apr-08 13:56 
GeneralRe: [c#] read a table from a web page Pin
Joshua8230-Apr-08 22:41
Joshua8230-Apr-08 22:41 
Question403 Forbidden Error Due To Incorrect Impersonation Level? Pin
TGT30-Apr-08 6:23
TGT30-Apr-08 6:23 
QuestionDatabound sitemap navigation Pin
Ariel Kazeed30-Apr-08 5:04
Ariel Kazeed30-Apr-08 5:04 
QuestionCopying website ?? Pin
kindman_nb30-Apr-08 4:35
kindman_nb30-Apr-08 4:35 
AnswerRe: Copying website ?? Pin
eyeseetee30-Apr-08 5:03
eyeseetee30-Apr-08 5:03 
GeneralRe: Copying website ?? Pin
kindman_nb30-Apr-08 5:08
kindman_nb30-Apr-08 5:08 
QuestionSending mail from the default email client - problem Pin
lune1230-Apr-08 4:21
lune1230-Apr-08 4:21 
AnswerRe: Sending mail from the default email client - problem Pin
i gr830-Apr-08 9:12
i gr830-Apr-08 9:12 
AnswerRe: Sending mail from the default email client - problem Pin
Christian Graus30-Apr-08 10:54
protectorChristian Graus30-Apr-08 10:54 
QuestionRe: Sending mail from the default email client - problem Pin
lune1230-Apr-08 20:48
lune1230-Apr-08 20:48 

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.