Showing posts with label menu. Show all posts
Showing posts with label menu. Show all posts

Monday, March 26, 2012

CCS getting lost while doing partial rendering with update panel......

hi !!

Problem :: CSS style lost when upatepanel does Partial Rendering..

I have made one navigation menu in javascript.. And i have onmouseover and onmouseout script...

In this script i m chaning the font and background image of <td>

The code is like this :

<tdid="menuid1" class="menuFont"onmouseover="show_popup(1)"onmouseout="javascript:m_show=0;">

<aid="mlink1" class="menuLink"href="#">Link1</a>

</td>

And the style is like bolow...

<styletype="text/css">

.menuFont1{font-size:11px;background:url(jsInclude/images/menu/nav_off_bg.gif)repeat-x;style=CURSOR:pointer;COLOR:#000000;FONT-FAMILY:Tahoma,Verdana,Arial,Helvetica,ans-serif;TEXT-ALIGN:center;TEXT-DECORATION:none}

.menuLink {color:#666666;TEXT-DECORATION:none;font-weight:bold}

.submenuLink{COLOR:#FFFFFF;TEXT-DECORATION:none}

.submenuFont{font-size:11px;COLOR:#ffffff;FONT-FAMILY:Tahoma,Verdana,Arial,Helvetica,sans-serif;height:16px;background-COLOR:#7885FF;TEXT-ALIGN:left}

</style>

Now in my form i have one text box and on its text_changed event i m doing partial rendering with update panel...

But when the response comes..the CSS of menu got lost...

Can any one help me what is the reason for this?

There has to be a boat out on the horizon somewhere. ,

catching the postBacks of UserControl inside another UserControl

My problem is that i've got:

MasterPage with a Menu, ScriptManager and a UpdatePanel, inside of wich i've put the the ContentPlaceHolder. I've put the Menu as trigger for the UpdatePanel

In the ContentPage i want to show, i have a UserControl that has inside of itself another UserControl.

Even putting an UpdatePanel in the ContentPage containing the UserControl (Parent), the whole page refreshes instead of been only the ContentPage, due to the UpdatePanel of the MasterPage.

All the UpdatePanels have de UpdateMode as Conditional.

How can i make this work, refreshing only the contentPage or the area pretended of the contentPage?

i've seen other Posts, but they only talk of one UserControl.

Thanks a lot.

You've got two problems:

First, the menu control is not compatible with partial-page updates and therefore not compatible with updatepanel controls.

Second, if you are using a master page, you are going to get a full refreshevery time you load a content page. When you navigate to a content page, you are not just reloading the part of the page that is in the contentplaceholder. You are loading anentire page that is a meshing of the master and content page. So what you are trying to do is not possible. Placing an updatepanel around a contentplaceholder does nothing. Different page = refresh.


thanks for your answer, but what i meant was the case of the usercontrols. the use of them makes me refresh the whole page, even though the content page is inside a update panel, i've tried to put the control inside a updatepanel conditional mode, but it still doesn't work.

this usercontrol was another one inside itself.


See if this article helps:

http://asp.net/ajax/documentation/live/tutorials/UsingUpdatePanelUserControls.aspx