Childvalue in parent control

Category: ASP.NET Questions    |    4 views    |    Add a Comment
hi all
Can any one tell me how to show child gridview footer value in parent gridview control like label or textbox

Share/Save/Bookmark

 

Displaying a Message in Response to Some Action and Then Hiding It on Subsequent Postbacks

Category: ASP.NET Questions    |    2 views    |    Add a Comment

ASP.NET web pages commonly display messages in response to user actions. For instance, a typical CRUD
(Create, Read, Update, Delete) web page
might display the message, “Record deleted” immediately after deleting a record and the message “Record updated”
immediately after updating a record. Likewise, there would be messages displayed for inserting a new record and messages displayed in the event of an error.
Such messages are typically displayed using a single Label Web control. This control may be located at the top of the page and have its Text
property initially set to empty string. Then, when particular events transpire, the Label’s Text property is updated accordingly.

The problem with this approach is that the Label’s Text property value is remembered across postbacks. Consequently, if a user deletes
a record the “Record deleted” message is displayed. If the user next sorts or pages the CRUD grid or perform some other action that results in a postback,
the Label control continues to display the message “Record deleted,” which is now outdated. What we want is to have the Label’s Text property
revert to an empty string on subsequent postbacks.

There are two simple and straightforward techniques at our disposal for implementing such functionality. This article examines these two approaches
and includes a working demo available for download that highlights both approaches. Read on to learn more!

Read More >

Share/Save/Bookmark

 

suggest a tool to make javascript unreadable

Category: AJAX Questions    |    3 views    |    Add a Comment
Greetings,

I wish to make my javascript sources really difficult to study.
Don’t suggest me those stupid "disable right click" tricks or so, I need code to be obfuscated (variables renamed, comments removed).
Please recommend me a javascript obfuscator for this. I found about 6 tools in search engines.
Among them, javascript obfuscator by stunnix looks most suitable to me. I didn’t try it though.
Any ideas? What obfuscator do you recommend?

Share/Save/Bookmark

 

Help with Drop down list

Category: AJAX Questions    |    2 views    |    Add a Comment
I want to change this code so that you can enter "Fruits" in a textr field and the drop down is populated instead of selecting "Fruits" from a drop down.

<!doctype html public "-//w3c//dtd html 3.2//en">

<html>

<head>
<title>Multiple drop down list box from plus2net</title>
<SCRIPT language=JavaScript>
function reload(form)
{
var val=form.cat.options[form.cat.options.selectedIndex].value;
self.location=’dd.php?cat=’ + val ;
}

</script>
</head>

<body>
<?

/*
If register_global is off in your server then after reloading of the page to get the value of cat from query string we have to take special care.
To read more on register_global visit.
  http://www.plus2net.com/php_tutorial/register-globals.php
*/
@$cat=$_GET[’cat’]; // Use this line or below line if register_global is off
//@$cat=$HTTP_GET_VARS[’cat’]; // Use this line or above line if register_global is off

///////// Getting the data from Mysql table for first list box//////////
$quer2=mysql_query("SELECT DISTINCT category,cat_id FROM category order by category"); 
///////////// End of query for first list box////////////

/////// for second drop down list we will check if category is selected else we will display all the subcategory///// 
if(isset($cat) and strlen($cat) > 0){
$quer=mysql_query("SELECT DISTINCT subcategory FROM subcategory where cat_id=$cat order by subcategory"); 
}else{$quer=mysql_query("SELECT DISTINCT subcategory FROM subcategory order by subcategory"); } 
////////// end of query for second subcategory drop down list box ///////////////////////////

echo "<form method=post name=f1 action=’dd-check.php’>";
/// Add your form processing page address to action in above line. Example  action=dd-check.php////
//////////        Starting of first drop downlist /////////
echo "<select name=’cat’ onchange=\"reload(this.form)\"><option value=”>Select one</option>";
while($noticia2 = mysql_fetch_array($quer2)) { 
if($noticia2[’cat_id’]==@$cat){echo "<option selected value=’$noticia2[cat_id]’>$noticia2[category]</option>"."<BR>";}
else{echo  "<option value=’$noticia2[cat_id]’>$noticia2[category]</option>";}
}
echo "</select>";
//////////////////  This will end the first drop down list ///////////

//////////        Starting of second drop downlist /////////
echo "<select name=’subcat’><option value=”>Select one</option>";
while($noticia = mysql_fetch_array($quer)) { 
echo  "<option value=’$noticia[subcategory]’>$noticia[subcategory]</option>";
}
echo "</select>";
//////////////////  This will end the second drop down list ///////////
//// Add your other form fields as needed here/////
echo "<input type=submit value=Submit>";
echo "</form>";
?>
<center><a href=’http://www.plus2net.com’>PHP SQL HTML free tutorials and scripts</a></center> 
</body>

</html>

Share/Save/Bookmark