Click here to Skip to main content
16,011,680 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: how to receive mail from asp.net Pin
mahmoud mohammed27-Apr-06 3:47
mahmoud mohammed27-Apr-06 3:47 
AnswerRe: how to receive mail from asp.net Pin
KrIstOfK27-Apr-06 3:23
KrIstOfK27-Apr-06 3:23 
GeneralRe: how to receive mail from asp.net Pin
mahmoud mohammed27-Apr-06 3:48
mahmoud mohammed27-Apr-06 3:48 
GeneralRe: how to receive mail from asp.net Pin
KrIstOfK27-Apr-06 4:48
KrIstOfK27-Apr-06 4:48 
QuestionAbout Web User Control Pin
Shivraj Patil27-Apr-06 0:10
Shivraj Patil27-Apr-06 0:10 
AnswerRe: About Web User Control Pin
Mike Ellison27-Apr-06 2:50
Mike Ellison27-Apr-06 2:50 
GeneralRe: About Web User Control Pin
Shivraj Patil27-Apr-06 18:40
Shivraj Patil27-Apr-06 18:40 
GeneralRe: About Web User Control Pin
Mike Ellison28-Apr-06 5:44
Mike Ellison28-Apr-06 5:44 
I see you are trying to explain this, and I am just not getting it. What I don't understand is how you are using this control. Let me walk through an example. Suppose I have these two files -
uc1.ascx:
<%@ Control Language="C#" %>

<script runat="server">

    void Button1Click(object o, EventArgs e)
    {
        Response.Write("Button1 was clicked");
    }

    void Button2Click(object o, EventArgs e)
    {
        Response.Write("Button2 was clicked");
    }
</script>

<asp:Panel runat="server" backColor="lightYellow"
           borderColor="black" borderStyle="Solid" borderWidth="1"
           >
    <p>This is the user control, <i>uc1.ascx</i></p>                   
    <asp:Button id="Button1" runat="server" Text="Button1"
                OnClick="Button1Click"
                />
    <asp:Button id="Button2" runat="server" Text="Button2"
                OnClick="Button2Click"
                />
                
</asp:Panel>


usercontroltest.aspx:
<%@ Page Language="C#" %>
<%@ Register TagPrefix="uc" TagName="uc1" Src="uc1.ascx" %>

<html>
  <head>
    <title>UserControl Test</title>
  </head>

  <body>
    <form runat="server">
    
        <p>Here is the user control.  Click a button to see what happens.</p>
        <uc:uc1 runat="server" />

    </form>
  </body>

</html>


The first is a custom user control with two buttons, and the second is a page which uses the control. Each button in the user control is assigned its own event, and when you try it out you'll see each different event is firing correctly. Is this what you mean? Or are you using your user control differently?
Questionjavascript file and xml file Pin
ritu432127-Apr-06 0:06
ritu432127-Apr-06 0:06 
AnswerRe: javascript file and xml file Pin
J4amieC27-Apr-06 0:23
J4amieC27-Apr-06 0:23 
GeneralRe: javascript file and xml file Pin
Guffa27-Apr-06 0:25
Guffa27-Apr-06 0:25 
QuestionASP.NET Files not opening!!! Pin
Commickey27-Apr-06 0:01
Commickey27-Apr-06 0:01 
AnswerRe: ASP.NET Files not opening!!! Pin
Mike Ellison27-Apr-06 2:47
Mike Ellison27-Apr-06 2:47 
GeneralRe: ASP.NET Files not opening!!! Pin
Commickey27-Apr-06 2:49
Commickey27-Apr-06 2:49 
QuestionWindows Control in a Web Form - disable ' Pin
doru.popa26-Apr-06 23:56
doru.popa26-Apr-06 23:56 
AnswerRe: Windows Control in a Web Form - disable ' Pin
Guffa27-Apr-06 0:33
Guffa27-Apr-06 0:33 
QuestionDoes anyone know...... Pin
daviiie26-Apr-06 23:50
daviiie26-Apr-06 23:50 
AnswerRe: Does anyone know...... Pin
J4amieC27-Apr-06 0:24
J4amieC27-Apr-06 0:24 
Questioncopy sqlserver Pin
ptvce26-Apr-06 23:36
ptvce26-Apr-06 23:36 
AnswerRe: copy sqlserver Pin
Guffa27-Apr-06 0:36
Guffa27-Apr-06 0:36 
AnswerRe: copy sqlserver Pin
Vasudevan Deepak Kumar27-Apr-06 4:29
Vasudevan Deepak Kumar27-Apr-06 4:29 
Questionshortcut Pin
chakkara200326-Apr-06 23:36
chakkara200326-Apr-06 23:36 
QuestionQuestion about Microsoft Services Manager Pin
KaKa'26-Apr-06 23:30
KaKa'26-Apr-06 23:30 
QuestionInfragistics Pin
NICE TO MEET26-Apr-06 22:59
NICE TO MEET26-Apr-06 22:59 
AnswerRe: Infragistics Pin
chakkara200326-Apr-06 23:27
chakkara200326-Apr-06 23:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.