View Full Version : yui-ext and asp.net?

18 Nov 2006, 6:34 PM
good job jack congratulations !!!!!!!!!!

Hi, I a thread I read:

The yui is all front end stuff. You can use firebug to see how requests are passed to the backend scripts. yui-ext is a javascript library and will work with whatever backend you have, whether it's php, asp, java....

is there any trouble using yui-ext and asp.net 1.1?

I have now the the example http://www.jackslocum.com/blog/examples/layout6.htm in aspx I mean I have layout6.aspx and it work OK, but now I set an asp.net button into aspx

<ASP></ASP> and in back end I set

private void button1_Click(object sender, System.EventArgs e)
button1.Text = "hi from layout6 page";

and never the event is trigger why?

if I a set comments in
<!-- <script>
Example = function(){
var layout;
return {
init : function(){
................... -->

the events is trigged, I have to do something to yui-ext work with asp.net?

kind regards

18 Nov 2006, 9:13 PM
Hi Frank, there's a thread in here with a workaround to get body rendered layouts to work with ASP.Net postbacks. It's very simple. If you have trouble finding it let me know.

19 Nov 2006, 5:28 AM
Thanks for you answer Jack, could you give me the link where is the thread a workaround to get body rendered layouts to work with ASP.Net postbacks, becouse I donīt found it.

kind regards

19 Nov 2006, 5:45 AM

Here's a snapshot of the fix:

Try putting this element inside your asp form:

<div id="layout-target" style="width:100%;height:100%;">
... Put your layout divs in here ...

Then when you initialize your your layout, render it to 'layout-target' instead of document.body.

You will also need this CSS as well:

body {overflow:hidden;margin:0;padding:0;border:0px none;}
html, body{height:100%;}

and on your body tag for IE7: <body scroll="no">...

The "asp form" we are talking about is the ASP.Net postback form that is rendered to the root on the page.

20 Nov 2006, 10:03 AM
Thanks again jack, but I resolve it using this aproach http://www.yui-ext.com/forum/viewtopic.php?t=323&highlight=asp+net+postbacks

I mean I do it:

I set fom1:

layout = new YAHOO.ext.BorderLayout('form1', {
I set false:

YAHOO.ext.EventManager.onDocumentReady(Example.init, Example, false);

I set an Id to aspx form

and now the postback is trigged, and the layout work ok.

kind regards