Click here to Skip to main content
15,888,401 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionMerge HTML into an existing asp.net page Pin
Anil Tomar30-Nov-10 8:44
Anil Tomar30-Nov-10 8:44 
AnswerRe: Merge HTML into an existing asp.net page [Cross Posting] Pin
Brij30-Nov-10 9:19
mentorBrij30-Nov-10 9:19 
AnswerRe: Merge HTML into an existing asp.net page Pin
T M Gray30-Nov-10 9:36
T M Gray30-Nov-10 9:36 
AnswerRe: Merge HTML into an existing asp.net page Pin
Mohammad Motealleh30-Nov-10 10:40
Mohammad Motealleh30-Nov-10 10:40 
AnswerCross post Pin
Pete O'Hanlon30-Nov-10 11:25
mvePete O'Hanlon30-Nov-10 11:25 
GeneralRe: Cross post Pin
Anil Tomar30-Nov-10 12:38
Anil Tomar30-Nov-10 12:38 
Questionalert dont display Pin
behzadcp30-Nov-10 1:16
professionalbehzadcp30-Nov-10 1:16 
AnswerRe: alert dont display [modified] Pin
Sebastien T.30-Nov-10 1:56
Sebastien T.30-Nov-10 1:56 
If I understand, when a user click on the button. In the event you have:

void btnTest_Click(object sender, EventArgs e)
       {
           Response.Write("<Script>alert('messge') </Script>");
           Response.Redirect("page2");
       }


in this case, the redirection is make and the page with the button cannot display the alert.

For resolve you problem try:

<script language="javascript">
       function onButtonClick()
        {
            alert("message");
            document.location = "http://www.google.fr";
        }
    </script>


<asp:Button ID="btnTest" runat="server" OnClientClick="javascript:onButtonClick()" />


If you have some thing to execute in the event, you can make this

void btnTest_Click(object sender, EventArgs e)
{
    Response.Write(@"<Script> alert('message');
                     document.location = 'http://www.google.fr'; </Script>");
}


modified on Tuesday, November 30, 2010 8:04 AM

AnswerRe: alert dont display Pin
Manfred Rudolf Bihy30-Nov-10 4:07
professionalManfred Rudolf Bihy30-Nov-10 4:07 
QuestionMessage Removed Pin
29-Nov-10 23:36
Shankaranarayana Thanthry29-Nov-10 23:36 
Answer5? Pin
Not Active30-Nov-10 0:15
mentorNot Active30-Nov-10 0:15 
QuestionSql Time Out Problem Pin
vishnukamath29-Nov-10 23:14
vishnukamath29-Nov-10 23:14 
AnswerRe: Sql Time Out Problem Pin
Goutam Patra29-Nov-10 23:30
professionalGoutam Patra29-Nov-10 23:30 
GeneralRe: Sql Time Out Problem Pin
vishnukamath29-Nov-10 23:52
vishnukamath29-Nov-10 23:52 
GeneralRe: Sql Time Out Problem Pin
Goutam Patra30-Nov-10 0:03
professionalGoutam Patra30-Nov-10 0:03 
AnswerRe: Sql Time Out Problem Pin
fjdiewornncalwe30-Nov-10 2:11
professionalfjdiewornncalwe30-Nov-10 2:11 
GeneralRe: Sql Time Out Problem Pin
David Mujica30-Nov-10 3:39
David Mujica30-Nov-10 3:39 
AnswerOT Pin
J4amieC30-Nov-10 5:00
J4amieC30-Nov-10 5:00 
AnswerRe: Sql Time Out Problem Pin
Hiren solanki1-Dec-10 22:14
Hiren solanki1-Dec-10 22:14 
QuestionSqlDataSource - Modify table without primary key Pin
Hanzaplast29-Nov-10 3:41
Hanzaplast29-Nov-10 3:41 
AnswerRe: SqlDataSource - Modify table without primary key Pin
Not Active29-Nov-10 5:06
mentorNot Active29-Nov-10 5:06 
AnswerRe: SqlDataSource - Modify table without primary key Pin
musefan29-Nov-10 5:47
musefan29-Nov-10 5:47 
GeneralRe: SqlDataSource - Modify table without primary key Pin
Keith Barrow29-Nov-10 7:39
professionalKeith Barrow29-Nov-10 7:39 
GeneralRe: SqlDataSource - Modify table without primary key Pin
musefan29-Nov-10 8:32
musefan29-Nov-10 8:32 
AnswerRe: SqlDataSource - Modify table without primary key Pin
T M Gray29-Nov-10 11:41
T M Gray29-Nov-10 11:41 

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.