views:

61

answers:

1

I need to convert this line of code from an asp.net c# page to asp.net IronPython, how would it be?

((IPostBackEventHandler)Button1).RaisePostBackEvent(null);
+2  A: 

Probably Button1.RaisePostBackEvent(None).

Python, being a dynamic language, doesn't need the type specified, as it has no notion of casting. And null in Python is spelled None.

Gabe
Although if you ever need to cast, you can use clr.Convert.
jcao219