IPostBackEventHandler没有传递事件参数 [英] IPostBackEventHandler not passing event argument

查看:69
本文介绍了IPostBackEventHandler没有传递事件参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经多次这样做但是由于某种原因它不起作用,加注

回发事件会触发,但传递给它的eventArgument是空的。这是一个简单的自定义控件实现

IPostBackEventHandler


我使用


string href = this.Page.GetPostBackClientHyperlink(this,

tab.TabID.ToString());


In回调argumts的痕迹列出但它永远不会到达


public void RaisePostBackEvent(string eventArgument)


{


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


this.SelectedID = Convert.ToInt32(eventArgument); < br $>

}


这必须成为众多更好的asp.net行为中的另一个,任何

的想法...谢谢......

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...

推荐答案

您是否将UniqueID分配给自定义控件的name属性?


-

HTH,


Kevin Spencer

Microsoft MVP

..网络开发者

太阳永远不会出现

天国


" Mike" < MI ******** @ com.nospam>在消息中写道

新闻:uW ************** @ TK2MSFTNGP12.phx.gbl ...
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" <mi********@com.nospam> wrote in message
news:uW**************@TK2MSFTNGP12.phx.gbl...
我做了这么多时间,但由于某种原因,它不起作用,加注
回发事件触发但传递给它的eventArgument是空的。这是一个简单的自定义控件,它实现了
IPostBackEventHandler

我得到了一个标签的href使用

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

在回发的跟踪中列出了argumts但它永远不会到达
/>
public void RaisePostBackEvent(string eventArgument)

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

this.SelectedID = Convert.ToInt32(eventArgument);

}
这必须成为众多更为激烈的asp.net行为中的另一个,任何
想法...谢谢......
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...



是设置了唯一ID并触发了RaisePostBackEvent但是eventArgument 是空的。


" Kevin Spencer" <柯*** @ DIESPAMMERSDIEtakempis.com>在消息中写道

新闻:uP **************** @ TK2MSFTNGP09.phx.gbl ...
Yes the unique id is set and RaisePostBackEvent is fired but eventArgument
passed to it is empty.

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uP****************@TK2MSFTNGP09.phx.gbl...
你指定了吗?自定义控件的name属性的UniqueID?

- HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
太阳永远不会落在天国

迈克上< MI ******** @ com.nospam>在消息中写道
新闻:uW ************** @ TK2MSFTNGP12.phx.gbl ...
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" <mi********@com.nospam> wrote in message
news:uW**************@TK2MSFTNGP12.phx.gbl...
我已经多次这样做但是对于某些人来说因为它不起作用,
引发回发事件会触发,但传递给它的eventArgument是空的。这个
是一个简单的自定义控件,实现了
IPostBackEventHandler

我得到了一个标签的href使用

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

在回发的跟踪中列出了argumts但它永远不会到达
/>
public void RaisePostBackEvent(string eventArgument)

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

this.SelectedID = Convert.ToInt32(eventArgument);

}
这必须成为众多更为激烈的asp.net行为中的另一个,任何
想法......谢谢......
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...




参见下面的事件:


public void RaisePostBackEvent(string eventArgument)

{

//这写正确值

this .Context.Trace.Write(" eventArgument =" +

this.Page.Request [" __ EVENTAR GUMENT"));


//这不会写出正确的值,它是空的

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


this.SelectedID = Convert.ToInt32(eventArgument);

}

" Kevin Spencer" <柯*** @ DIESPAMMERSDIEtakempis.com>在消息中写道

新闻:uP **************** @ TK2MSFTNGP09.phx.gbl ...
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" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uP****************@TK2MSFTNGP09.phx.gbl...
你指定了吗?自定义控件的name属性的UniqueID?

- HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
太阳永远不会落在天国

迈克上< MI ******** @ com.nospam>在消息中写道
新闻:uW ************** @ TK2MSFTNGP12.phx.gbl ...
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" <mi********@com.nospam> wrote in message
news:uW**************@TK2MSFTNGP12.phx.gbl...
我已经多次这样做但是对于某些人来说因为它不起作用,
引发回发事件会触发,但传递给它的eventArgument是空的。这个
是一个简单的自定义控件,实现了
IPostBackEventHandler

我得到了一个标签的href使用

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

在回发的跟踪中列出了argumts但它永远不会到达
/>
public void RaisePostBackEvent(string eventArgument)

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

this.SelectedID = Convert.ToInt32(eventArgument);

}
这必须成为众多更为激烈的asp.net行为中的另一个,任何
想法......谢谢......
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...




这篇关于IPostBackEventHandler没有传递事件参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆