Hi guys,
I thank you for your replies..
I read the last sample from George, and I have a couple of questions..
It seems with asp.net, you could not have a kind of "autonomous" control..
I hear by autonomous, have control user with its own actions..
Example :
I have a section part into my layout that allows the user to log in.
So I have the bit of code with asp
<Form action="login.asp">
<Input type="text" name="userid">
<Input type="text" name="password">
<Input type="submit" value="login" name="login">
</form>
Another part where the user can search..
<Form action="search.asp">
<Input type="text" name="keywords">
<Input type="submit" value="Search" name="Search">
</form>
All these parts are duplicated into my several pages (as I said using
Include).
When I read the code from the masterpages concept, I ve seen that I have to
paste the different actions
for the Click events into the different pages that use the user controls,
isn't it ?
I m talking about this bit of code :
<script runat="server">
void ClickedCapitalize(object o, EventArgs e) {
capitalized.Text = Server.HtmlEncode(tb1.Text.ToUpper());
}
void SayHello(object o, EventArgs e) {
name.Text = Server.HtmlEncode(tb2.Text);
}
</script>
Is it the only way to accomplish this ?
Regards
Stan