IPostBackEventHandler not passing event argument

Discussion in 'ASP .Net' started by Mike, Jul 22, 2005.

  1. Mike

    Mike Guest

    I have done this many times but for some reason it's not working, the raise
    postback event fires but the eventArgument passed to it is empty. This is a
    simple custom control that implements
    IPostBackEventHandler

    and I get the href for the a tag using

    string href = this.Page.GetPostBackClientHyperlink(this,
    tab.TabID.ToString());

    In the trace for the postback the argumts is listed but it never arrives at



    public void RaisePostBackEvent(string eventArgument)

    {

    this.Context.Trace.Write("SelectedID=" + eventArgument);

    this.SelectedID = Convert.ToInt32(eventArgument);

    }



    This has got to be another one of the many wier asp.net behaviors, any
    ideas...Thanks...
     
    Mike, Jul 22, 2005
    #1
    1. Advertising

  2. Did you assign the UniqueID to the name attribute of the custom Control?

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    The sun never sets on
    the Kingdom of Heaven

    "Mike" <> wrote in message
    news:...
    >I have done this many times but for some reason it's not working, the raise
    > postback event fires but the eventArgument passed to it is empty. This is
    > a
    > simple custom control that implements
    > IPostBackEventHandler
    >
    > and I get the href for the a tag using
    >
    > string href = this.Page.GetPostBackClientHyperlink(this,
    > tab.TabID.ToString());
    >
    > In the trace for the postback the argumts is listed but it never arrives
    > at
    >
    >
    >
    > public void RaisePostBackEvent(string eventArgument)
    >
    > {
    >
    > this.Context.Trace.Write("SelectedID=" + eventArgument);
    >
    > this.SelectedID = Convert.ToInt32(eventArgument);
    >
    > }
    >
    >
    >
    > This has got to be another one of the many wier asp.net behaviors, any
    > ideas...Thanks...
    >
    >
     
    Kevin Spencer, Jul 22, 2005
    #2
    1. Advertising

  3. Mike

    Mike Guest

    Yes the unique id is set and RaisePostBackEvent is fired but eventArgument
    passed to it is empty.

    "Kevin Spencer" <> wrote in message
    news:uP9E%...
    > Did you assign the UniqueID to the name attribute of the custom Control?
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > The sun never sets on
    > the Kingdom of Heaven
    >
    > "Mike" <> wrote in message
    > news:...
    > >I have done this many times but for some reason it's not working, the

    raise
    > > postback event fires but the eventArgument passed to it is empty. This

    is
    > > a
    > > simple custom control that implements
    > > IPostBackEventHandler
    > >
    > > and I get the href for the a tag using
    > >
    > > string href = this.Page.GetPostBackClientHyperlink(this,
    > > tab.TabID.ToString());
    > >
    > > In the trace for the postback the argumts is listed but it never arrives
    > > at
    > >
    > >
    > >
    > > public void RaisePostBackEvent(string eventArgument)
    > >
    > > {
    > >
    > > this.Context.Trace.Write("SelectedID=" + eventArgument);
    > >
    > > this.SelectedID = Convert.ToInt32(eventArgument);
    > >
    > > }
    > >
    > >
    > >
    > > This has got to be another one of the many wier asp.net behaviors, any
    > > ideas...Thanks...
    > >
    > >

    >
    >
     
    Mike, Jul 22, 2005
    #3
  4. Mike

    Mike Guest

    See Event Below:

    public void RaisePostBackEvent(string eventArgument)
    {
    // this writes the correct value
    this.Context.Trace.Write("eventArgument=" +
    this.Page.Request["__EVENTARGUMENT"]);

    // this does NOT write the correct value, it is empty
    this.Context.Trace.Write("eventArgument=" + eventArgument);

    this.SelectedID = Convert.ToInt32(eventArgument);
    }


    "Kevin Spencer" <> wrote in message
    news:uP9E%...
    > Did you assign the UniqueID to the name attribute of the custom Control?
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > The sun never sets on
    > the Kingdom of Heaven
    >
    > "Mike" <> wrote in message
    > news:...
    > >I have done this many times but for some reason it's not working, the

    raise
    > > postback event fires but the eventArgument passed to it is empty. This

    is
    > > a
    > > simple custom control that implements
    > > IPostBackEventHandler
    > >
    > > and I get the href for the a tag using
    > >
    > > string href = this.Page.GetPostBackClientHyperlink(this,
    > > tab.TabID.ToString());
    > >
    > > In the trace for the postback the argumts is listed but it never arrives
    > > at
    > >
    > >
    > >
    > > public void RaisePostBackEvent(string eventArgument)
    > >
    > > {
    > >
    > > this.Context.Trace.Write("SelectedID=" + eventArgument);
    > >
    > > this.SelectedID = Convert.ToInt32(eventArgument);
    > >
    > > }
    > >
    > >
    > >
    > > This has got to be another one of the many wier asp.net behaviors, any
    > > ideas...Thanks...
    > >
    > >

    >
    >
     
    Mike, Jul 22, 2005
    #4
  5. What does your LoadPostData method look like?

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    The sun never sets on
    the Kingdom of Heaven

    "Mike" <> wrote in message
    news:...
    > See Event Below:
    >
    > public void RaisePostBackEvent(string eventArgument)
    > {
    > // this writes the correct value
    > this.Context.Trace.Write("eventArgument=" +
    > this.Page.Request["__EVENTARGUMENT"]);
    >
    > // this does NOT write the correct value, it is empty
    > this.Context.Trace.Write("eventArgument=" + eventArgument);
    >
    > this.SelectedID = Convert.ToInt32(eventArgument);
    > }
    >
    >
    > "Kevin Spencer" <> wrote in message
    > news:uP9E%...
    >> Did you assign the UniqueID to the name attribute of the custom Control?
    >>
    >> --
    >> HTH,
    >>
    >> Kevin Spencer
    >> Microsoft MVP
    >> .Net Developer
    >> The sun never sets on
    >> the Kingdom of Heaven
    >>
    >> "Mike" <> wrote in message
    >> news:...
    >> >I have done this many times but for some reason it's not working, the

    > raise
    >> > postback event fires but the eventArgument passed to it is empty. This

    > is
    >> > a
    >> > simple custom control that implements
    >> > IPostBackEventHandler
    >> >
    >> > and I get the href for the a tag using
    >> >
    >> > string href = this.Page.GetPostBackClientHyperlink(this,
    >> > tab.TabID.ToString());
    >> >
    >> > In the trace for the postback the argumts is listed but it never
    >> > arrives
    >> > at
    >> >
    >> >
    >> >
    >> > public void RaisePostBackEvent(string eventArgument)
    >> >
    >> > {
    >> >
    >> > this.Context.Trace.Write("SelectedID=" + eventArgument);
    >> >
    >> > this.SelectedID = Convert.ToInt32(eventArgument);
    >> >
    >> > }
    >> >
    >> >
    >> >
    >> > This has got to be another one of the many wier asp.net behaviors, any
    >> > ideas...Thanks...
    >> >
    >> >

    >>
    >>

    >
    >
     
    Kevin Spencer, Jul 22, 2005
    #5
  6. Mike

    Mike Guest

    I did read that you may need to implement IPostBackDataHandler, would sure
    like to know why?

    I did try it with the same results and the code is below:

    public bool LoadPostData(String postDataKey, NameValueCollection values)
    {
    return false;
    }

    public void RaisePostDataChangedEvent()
    {

    }



    "Kevin Spencer" <> wrote in message
    news:...
    > What does your LoadPostData method look like?
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > The sun never sets on
    > the Kingdom of Heaven
    >
    > "Mike" <> wrote in message
    > news:...
    > > See Event Below:
    > >
    > > public void RaisePostBackEvent(string eventArgument)
    > > {
    > > // this writes the correct value
    > > this.Context.Trace.Write("eventArgument=" +
    > > this.Page.Request["__EVENTARGUMENT"]);
    > >
    > > // this does NOT write the correct value, it is empty
    > > this.Context.Trace.Write("eventArgument=" + eventArgument);
    > >
    > > this.SelectedID = Convert.ToInt32(eventArgument);
    > > }
    > >
    > >
    > > "Kevin Spencer" <> wrote in message
    > > news:uP9E%...
    > >> Did you assign the UniqueID to the name attribute of the custom

    Control?
    > >>
    > >> --
    > >> HTH,
    > >>
    > >> Kevin Spencer
    > >> Microsoft MVP
    > >> .Net Developer
    > >> The sun never sets on
    > >> the Kingdom of Heaven
    > >>
    > >> "Mike" <> wrote in message
    > >> news:...
    > >> >I have done this many times but for some reason it's not working, the

    > > raise
    > >> > postback event fires but the eventArgument passed to it is empty.

    This
    > > is
    > >> > a
    > >> > simple custom control that implements
    > >> > IPostBackEventHandler
    > >> >
    > >> > and I get the href for the a tag using
    > >> >
    > >> > string href = this.Page.GetPostBackClientHyperlink(this,
    > >> > tab.TabID.ToString());
    > >> >
    > >> > In the trace for the postback the argumts is listed but it never
    > >> > arrives
    > >> > at
    > >> >
    > >> >
    > >> >
    > >> > public void RaisePostBackEvent(string eventArgument)
    > >> >
    > >> > {
    > >> >
    > >> > this.Context.Trace.Write("SelectedID=" + eventArgument);
    > >> >
    > >> > this.SelectedID = Convert.ToInt32(eventArgument);
    > >> >
    > >> > }
    > >> >
    > >> >
    > >> >
    > >> > This has got to be another one of the many wier asp.net behaviors,

    any
    > >> > ideas...Thanks...
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
     
    Mike, Jul 22, 2005
    #6
  7. Hi Mike,

    The LoadPostData method is the one where you get the value from the
    drop-down list box. You would then loop through your data source to figure
    out the selected index.

    I have an article/tutorial that does just that (using VB.Net as the
    language). See:

    http://www.takempis.com/aspnet_anatomy3.asp

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    The sun never sets on
    the Kingdom of Heaven

    "Mike" <> wrote in message
    news:...
    >I did read that you may need to implement IPostBackDataHandler, would sure
    > like to know why?
    >
    > I did try it with the same results and the code is below:
    >
    > public bool LoadPostData(String postDataKey, NameValueCollection values)
    > {
    > return false;
    > }
    >
    > public void RaisePostDataChangedEvent()
    > {
    >
    > }
    >
    >
    >
    > "Kevin Spencer" <> wrote in message
    > news:...
    >> What does your LoadPostData method look like?
    >>
    >> --
    >> HTH,
    >>
    >> Kevin Spencer
    >> Microsoft MVP
    >> .Net Developer
    >> The sun never sets on
    >> the Kingdom of Heaven
    >>
    >> "Mike" <> wrote in message
    >> news:...
    >> > See Event Below:
    >> >
    >> > public void RaisePostBackEvent(string eventArgument)
    >> > {
    >> > // this writes the correct value
    >> > this.Context.Trace.Write("eventArgument=" +
    >> > this.Page.Request["__EVENTARGUMENT"]);
    >> >
    >> > // this does NOT write the correct value, it is empty
    >> > this.Context.Trace.Write("eventArgument=" + eventArgument);
    >> >
    >> > this.SelectedID = Convert.ToInt32(eventArgument);
    >> > }
    >> >
    >> >
    >> > "Kevin Spencer" <> wrote in message
    >> > news:uP9E%...
    >> >> Did you assign the UniqueID to the name attribute of the custom

    > Control?
    >> >>
    >> >> --
    >> >> HTH,
    >> >>
    >> >> Kevin Spencer
    >> >> Microsoft MVP
    >> >> .Net Developer
    >> >> The sun never sets on
    >> >> the Kingdom of Heaven
    >> >>
    >> >> "Mike" <> wrote in message
    >> >> news:...
    >> >> >I have done this many times but for some reason it's not working, the
    >> > raise
    >> >> > postback event fires but the eventArgument passed to it is empty.

    > This
    >> > is
    >> >> > a
    >> >> > simple custom control that implements
    >> >> > IPostBackEventHandler
    >> >> >
    >> >> > and I get the href for the a tag using
    >> >> >
    >> >> > string href = this.Page.GetPostBackClientHyperlink(this,
    >> >> > tab.TabID.ToString());
    >> >> >
    >> >> > In the trace for the postback the argumts is listed but it never
    >> >> > arrives
    >> >> > at
    >> >> >
    >> >> >
    >> >> >
    >> >> > public void RaisePostBackEvent(string eventArgument)
    >> >> >
    >> >> > {
    >> >> >
    >> >> > this.Context.Trace.Write("SelectedID=" + eventArgument);
    >> >> >
    >> >> > this.SelectedID = Convert.ToInt32(eventArgument);
    >> >> >
    >> >> > }
    >> >> >
    >> >> >
    >> >> >
    >> >> > This has got to be another one of the many wier asp.net behaviors,

    > any
    >> >> > ideas...Thanks...
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
    Kevin Spencer, Jul 22, 2005
    #7
  8. Mike

    Mike Guest

    Kevin,

    This is a control that writes the html for a couple of links, no child
    controls. I am simply using an anchor tag with
    Page.GetPostBackClientHyperlink(this, linkID) as the href attribute when
    rendering the control. linkID is just an internal ID so that the control can
    tell wich link was clicked: 0,1,2,3 and so on...

    The problem is that when RaisePostBackEvent is called the eventArgumet
    parameter does not contain my internal ID that I pass with each link as
    shown below. __EVENTARGUMENT is there just as it should be but dotnet never
    hands it to my implementation of the RaisePostBackEvent. I can get it to
    work if I just grab __EVENTARGUMENT from the Request object but that seems
    like a rediculus hack.

    public void RaisePostBackEvent(string eventArgument)
    {
    // this writes the correct value
    this.Context.Trace.Write("eventArgument=" +
    this.Page.Request["__EVENTARGUMENT"]);
    // this does NOT write the correct value, it is empty
    this.Context.Trace.Write("eventArgument=" + eventArgument);
    }

    Thanks,

    Mike


    "Kevin Spencer" <> wrote in message
    news:...
    > Hi Mike,
    >
    > The LoadPostData method is the one where you get the value from the
    > drop-down list box. You would then loop through your data source to figure
    > out the selected index.
    >
    > I have an article/tutorial that does just that (using VB.Net as the
    > language). See:
    >
    > http://www.takempis.com/aspnet_anatomy3.asp
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > The sun never sets on
    > the Kingdom of Heaven
    >
    > "Mike" <> wrote in message
    > news:...
    > >I did read that you may need to implement IPostBackDataHandler, would

    sure
    > > like to know why?
    > >
    > > I did try it with the same results and the code is below:
    > >
    > > public bool LoadPostData(String postDataKey, NameValueCollection values)
    > > {
    > > return false;
    > > }
    > >
    > > public void RaisePostDataChangedEvent()
    > > {
    > >
    > > }
    > >
    > >
    > >
    > > "Kevin Spencer" <> wrote in message
    > > news:...
    > >> What does your LoadPostData method look like?
    > >>
    > >> --
    > >> HTH,
    > >>
    > >> Kevin Spencer
    > >> Microsoft MVP
    > >> .Net Developer
    > >> The sun never sets on
    > >> the Kingdom of Heaven
    > >>
    > >> "Mike" <> wrote in message
    > >> news:...
    > >> > See Event Below:
    > >> >
    > >> > public void RaisePostBackEvent(string eventArgument)
    > >> > {
    > >> > // this writes the correct value
    > >> > this.Context.Trace.Write("eventArgument=" +
    > >> > this.Page.Request["__EVENTARGUMENT"]);
    > >> >
    > >> > // this does NOT write the correct value, it is empty
    > >> > this.Context.Trace.Write("eventArgument=" + eventArgument);
    > >> >
    > >> > this.SelectedID = Convert.ToInt32(eventArgument);
    > >> > }
    > >> >
    > >> >
    > >> > "Kevin Spencer" <> wrote in message
    > >> > news:uP9E%...
    > >> >> Did you assign the UniqueID to the name attribute of the custom

    > > Control?
    > >> >>
    > >> >> --
    > >> >> HTH,
    > >> >>
    > >> >> Kevin Spencer
    > >> >> Microsoft MVP
    > >> >> .Net Developer
    > >> >> The sun never sets on
    > >> >> the Kingdom of Heaven
    > >> >>
    > >> >> "Mike" <> wrote in message
    > >> >> news:...
    > >> >> >I have done this many times but for some reason it's not working,

    the
    > >> > raise
    > >> >> > postback event fires but the eventArgument passed to it is empty.

    > > This
    > >> > is
    > >> >> > a
    > >> >> > simple custom control that implements
    > >> >> > IPostBackEventHandler
    > >> >> >
    > >> >> > and I get the href for the a tag using
    > >> >> >
    > >> >> > string href = this.Page.GetPostBackClientHyperlink(this,
    > >> >> > tab.TabID.ToString());
    > >> >> >
    > >> >> > In the trace for the postback the argumts is listed but it never
    > >> >> > arrives
    > >> >> > at
    > >> >> >
    > >> >> >
    > >> >> >
    > >> >> > public void RaisePostBackEvent(string eventArgument)
    > >> >> >
    > >> >> > {
    > >> >> >
    > >> >> > this.Context.Trace.Write("SelectedID=" + eventArgument);
    > >> >> >
    > >> >> > this.SelectedID = Convert.ToInt32(eventArgument);
    > >> >> >
    > >> >> > }
    > >> >> >
    > >> >> >
    > >> >> >
    > >> >> > This has got to be another one of the many wier asp.net behaviors,

    > > any
    > >> >> > ideas...Thanks...
    > >> >> >
    > >> >> >
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
     
    Mike, Jul 22, 2005
    #8
  9. Mike

    Mike Guest

    PROBLEM SOLVED!!!!!

    I did a project wide search for RegisterRequiresRaiseEvent and found
    Page.RegisterRequiresRaiseEvent(this) was being called in another control on
    the page. This completely breaks all other events on the page.

    Spent two days trying to figure this out so maybe this helps someone else.

    I know exactly why this caused a problem but this is just one more example
    of one of those wierd things that dotnet does that drives me crazy.

    Mike

    "Mike" <> wrote in message
    news:...
    > I have done this many times but for some reason it's not working, the

    raise
    > postback event fires but the eventArgument passed to it is empty. This is

    a
    > simple custom control that implements
    > IPostBackEventHandler
    >
    > and I get the href for the a tag using
    >
    > string href = this.Page.GetPostBackClientHyperlink(this,
    > tab.TabID.ToString());
    >
    > In the trace for the postback the argumts is listed but it never arrives

    at
    >
    >
    >
    > public void RaisePostBackEvent(string eventArgument)
    >
    > {
    >
    > this.Context.Trace.Write("SelectedID=" + eventArgument);
    >
    > this.SelectedID = Convert.ToInt32(eventArgument);
    >
    > }
    >
    >
    >
    > This has got to be another one of the many wier asp.net behaviors, any
    > ideas...Thanks...
    >
    >
     
    Mike, Jul 23, 2005
    #9
  10. Glad you got it solved Mike, as I was away over the weekend!

    --

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    The sun never sets on
    the Kingdom of Heaven

    "Mike" <> wrote in message
    news:...
    > PROBLEM SOLVED!!!!!
    >
    > I did a project wide search for RegisterRequiresRaiseEvent and found
    > Page.RegisterRequiresRaiseEvent(this) was being called in another control
    > on
    > the page. This completely breaks all other events on the page.
    >
    > Spent two days trying to figure this out so maybe this helps someone else.
    >
    > I know exactly why this caused a problem but this is just one more example
    > of one of those wierd things that dotnet does that drives me crazy.
    >
    > Mike
    >
    > "Mike" <> wrote in message
    > news:...
    >> I have done this many times but for some reason it's not working, the

    > raise
    >> postback event fires but the eventArgument passed to it is empty. This
    >> is

    > a
    >> simple custom control that implements
    >> IPostBackEventHandler
    >>
    >> and I get the href for the a tag using
    >>
    >> string href = this.Page.GetPostBackClientHyperlink(this,
    >> tab.TabID.ToString());
    >>
    >> In the trace for the postback the argumts is listed but it never arrives

    > at
    >>
    >>
    >>
    >> public void RaisePostBackEvent(string eventArgument)
    >>
    >> {
    >>
    >> this.Context.Trace.Write("SelectedID=" + eventArgument);
    >>
    >> this.SelectedID = Convert.ToInt32(eventArgument);
    >>
    >> }
    >>
    >>
    >>
    >> This has got to be another one of the many wier asp.net behaviors, any
    >> ideas...Thanks...
    >>
    >>

    >
    >
     
    Kevin Spencer, Jul 25, 2005
    #10
  11. "Kevin Spencer" wrote:

    > Glad you got it solved Mike, as I was away over the weekend!
    >
    > --
    >
    > Kevin Spencer
    > Microsoft MVP
    > ..Net Developer
    > The sun never sets on
    > the Kingdom of Heaven
    >
    > "Mike" <> wrote in message
    > news:...
    > > PROBLEM SOLVED!!!!!
    > >
    > > I did a project wide search for RegisterRequiresRaiseEvent and found
    > > Page.RegisterRequiresRaiseEvent(this) was being called in another control
    > > on
    > > the page. This completely breaks all other events on the page.
    > >
    > > Spent two days trying to figure this out so maybe this helps someone else.
    > >
    > > I know exactly why this caused a problem but this is just one more example
    > > of one of those wierd things that dotnet does that drives me crazy.
    > >
    > > Mike
    > >
    > > "Mike" <> wrote in message
    > > news:...
    > >> I have done this many times but for some reason it's not working, the

    > > raise
    > >> postback event fires but the eventArgument passed to it is empty. This
    > >> is

    > > a
    > >> simple custom control that implements
    > >> IPostBackEventHandler
    > >>
    > >> and I get the href for the a tag using
    > >>
    > >> string href = this.Page.GetPostBackClientHyperlink(this,
    > >> tab.TabID.ToString());
    > >>
    > >> In the trace for the postback the argumts is listed but it never arrives

    > > at
    > >>
    > >>
    > >>
    > >> public void RaisePostBackEvent(string eventArgument)
    > >>
    > >> {
    > >>
    > >> this.Context.Trace.Write("SelectedID=" + eventArgument);
    > >>
    > >> this.SelectedID = Convert.ToInt32(eventArgument);
    > >>
    > >> }
    > >>
    > >>
    > >>
    > >> This has got to be another one of the many wier asp.net behaviors, any
    > >> ideas...Thanks...
    > >>
    > >>

    > >
    > >

    >
    >
    >
     
    =?Utf-8?B?aGFuIHpoaXlhbmc=?=, Sep 22, 2005
    #11
  12. I wonder if the Page.RegisterRequiresRaiseEvent and Page.RequiresPostBack are
    asp.net bugs,for they are somewhat "ugly" and difficult to use.At the same
    time, I wonder if there is other alternatives I can choose.I've read the book
    "Developing Microsoft ASP.NET Server Controls and Components" by Nikhil
    Kothari, and here is some codes in LoadPostData method in code list 9-11:

    bool buttonClicked = (buttonValue != null) && (buttonValue.Length != 0);
    if (buttonClicked) Page.RegisterRequiresRaiseEvent(this);

    Reading these codes,I feel I go back to the asp times again. these are
    somewhat ugly.
    "Kevin Spencer" wrote:

    > Glad you got it solved Mike, as I was away over the weekend!
    >
    > --
    >
    > Kevin Spencer
    > Microsoft MVP
    > ..Net Developer
    > The sun never sets on
    > the Kingdom of Heaven
    >
    > "Mike" <> wrote in message
    > news:...
    > > PROBLEM SOLVED!!!!!
    > >
    > > I did a project wide search for RegisterRequiresRaiseEvent and found
    > > Page.RegisterRequiresRaiseEvent(this) was being called in another control
    > > on
    > > the page. This completely breaks all other events on the page.
    > >
    > > Spent two days trying to figure this out so maybe this helps someone else.
    > >
    > > I know exactly why this caused a problem but this is just one more example
    > > of one of those wierd things that dotnet does that drives me crazy.
    > >
    > > Mike
    > >
    > > "Mike" <> wrote in message
    > > news:...
    > >> I have done this many times but for some reason it's not working, the

    > > raise
    > >> postback event fires but the eventArgument passed to it is empty. This
    > >> is

    > > a
    > >> simple custom control that implements
    > >> IPostBackEventHandler
    > >>
    > >> and I get the href for the a tag using
    > >>
    > >> string href = this.Page.GetPostBackClientHyperlink(this,
    > >> tab.TabID.ToString());
    > >>
    > >> In the trace for the postback the argumts is listed but it never arrives

    > > at
    > >>
    > >>
    > >>
    > >> public void RaisePostBackEvent(string eventArgument)
    > >>
    > >> {
    > >>
    > >> this.Context.Trace.Write("SelectedID=" + eventArgument);
    > >>
    > >> this.SelectedID = Convert.ToInt32(eventArgument);
    > >>
    > >> }
    > >>
    > >>
    > >>
    > >> This has got to be another one of the many wier asp.net behaviors, any
    > >> ideas...Thanks...
    > >>
    > >>

    > >
    > >

    >
    >
    >
     
    =?Utf-8?B?aGFuIHpoaXlhbmc=?=, Sep 22, 2005
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?S2xvbSBEYXJr?=

    Table of dynamic buttons implemeting IPostBackEventHandler

    =?Utf-8?B?S2xvbSBEYXJr?=, Jun 17, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    689
    avnrao
    Jun 17, 2004
  2. Sam Martin
    Replies:
    4
    Views:
    7,692
    William F. Robertson, Jr.
    Sep 15, 2004
  3. Mr Newbie
    Replies:
    1
    Views:
    3,620
    Mr Newbie
    Nov 7, 2005
  4. Louis Somers
    Replies:
    3
    Views:
    3,266
    RichardPetheram
    Oct 17, 2008
  5. Ahmet Gunes

    Click event does not fire - IPostBackEventHandler ?

    Ahmet Gunes, Jun 30, 2008, in forum: ASP .Net Building Controls
    Replies:
    6
    Views:
    1,099
    Ion Lamasanu
    Aug 5, 2008
Loading...

Share This Page