SharpDeveloper
Changes in __doPostback in .NET 1.1 to .NET 2.0
Before and After
If you manually want to simulate a postback, Here is how you would stick together a string manually calling __doPostBack in .NET 1.1
In this case its making a link in a particular linkbutton control inside a datagrid.
__doPostBack in .NET 1.0
string link = "<a href=\"javascript:__doPostBack('dataGridCart$_ctl" + i + "$linkButton','');\"";
__doPostBack in .NET 2.0
string link = "<a href=\"javascript:__doPostBack('dataGridCart$ctl0" + i + "$linkButton','');\"";
Dont use this function any more. Use Page.GetPostBackClientHyperlink from .NET 2.0+. This is because they might change __doPostBack yet again and your code will be broken.
Look at the comment thread on this codeproject article for more details
Further reading: Do Postback Hijacking
Related Reading:
Other Interesting Posts
-
Articles
- January 2011
- April 2010
- March 2010
- February 2010
- January 2010
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- February 2009
- December 2008
- November 2008
- October 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
-
Meta







