views:

118

answers:

2

Hi,

I have a webpart with asp.net control within. I would like to hide some parts of that control, some asp:net panels etc. regarding one of the TextBox's value. The issue is that I don't know to change the visibility of asp:panel wrapper without any postback, and how to refresh page to see the changes on the UI. I was trying to implement TextChanged event but it dosen't work. Can anybody help me, please?

A: 

The answer for this question is AJAX. For example asp:updatepanel can be used.

truthseeker
A: 

I'd go for a pure client side solution using JavaScript / jQuery.

So you could some jQuerycode like this (untestet)

<script>
$(document).ready(function(){
  $.(Id$='IdOfYourTextBox').blur(function(){
    $.(Id$='IdOfYourPanel').hide();
  });
});
</script>

You could register this script from your webpart using the ClientScriptManager RegisterClientScriptBlock Method.

Andre Kraemer