Click here to Skip to main content
15,900,110 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Doubt on Cookie - asp.net 2.0 [modified] Pin
Brij19-Apr-10 20:41
mentorBrij19-Apr-10 20:41 
GeneralRe: Doubt on Cookie - asp.net 2.0 Pin
Abhijit Jana19-Apr-10 20:42
professionalAbhijit Jana19-Apr-10 20:42 
QuestionWeb user control , Grid edit item collapse .Cancel Pin
mark_me19-Apr-10 13:57
mark_me19-Apr-10 13:57 
QuestionBrowser "Back" Botton - how to control Pin
Abdul-Rhman Alsri19-Apr-10 10:08
Abdul-Rhman Alsri19-Apr-10 10:08 
AnswerRe: Browser "Back" Botton - how to control Pin
Not Active19-Apr-10 10:35
mentorNot Active19-Apr-10 10:35 
AnswerRe: Browser "Back" Botton - how to control Pin
Jamil Hallal21-Apr-10 3:17
professionalJamil Hallal21-Apr-10 3:17 
Questionalert message box in update panel Pin
ships_agr19-Apr-10 7:43
ships_agr19-Apr-10 7:43 
AnswerRe: alert message box in update panel Pin
Brij19-Apr-10 8:07
mentorBrij19-Apr-10 8:07 
So if you want to show the message on button click then why you assigned the function to window.onload event,I just tried your code and put it Page_Load and it was showing the alert message... Smile | :)

So if you want to run it on button click the use the code below
string msg = "You cannot select more seats.";
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        sb.Append("<script type='text/javascript'>");
        sb.Append("function ShowAlert(){");
        sb.Append("alert('");
        sb.Append(msg);
        sb.Append("'); return false;};");
        sb.Append("</script>");
        ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "alert", sb.ToString(), false);


and button should be as
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="javascript:return ShowAlert();" />


let me know if face any issue.

GeneralRe: alert message box in update panel Pin
ships_agr20-Apr-10 5:28
ships_agr20-Apr-10 5:28 
QuestionServer Error in '/' Application. Pin
Abdul-Rhman Alsri19-Apr-10 7:18
Abdul-Rhman Alsri19-Apr-10 7:18 
AnswerRe: Server Error in '/' Application. Pin
Abhijit Jana19-Apr-10 11:03
professionalAbhijit Jana19-Apr-10 11:03 
QuestionAn Issue with Databind() for a GridView Pin
PDTUM19-Apr-10 6:09
PDTUM19-Apr-10 6:09 
AnswerRe: An Issue with Databind() for a GridView Pin
PDTUM19-Apr-10 8:00
PDTUM19-Apr-10 8:00 
QuestionAssign themes programmatically - Master Pages Pin
Karan_TN19-Apr-10 4:04
Karan_TN19-Apr-10 4:04 
AnswerRe: Assign themes programmatically - Master Pages Pin
daveyerwin19-Apr-10 5:01
daveyerwin19-Apr-10 5:01 
GeneralRe: Assign themes programmatically - Master Pages Pin
Karan_TN19-Apr-10 16:50
Karan_TN19-Apr-10 16:50 
GeneralRe: Assign themes programmatically - Master Pages Pin
daveyerwin20-Apr-10 5:11
daveyerwin20-Apr-10 5:11 
AnswerRe: Assign themes programmatically - Master Pages Pin
Abhijit Jana19-Apr-10 6:34
professionalAbhijit Jana19-Apr-10 6:34 
GeneralRe: Assign themes programmatically - Master Pages Pin
Karan_TN19-Apr-10 16:51
Karan_TN19-Apr-10 16:51 
GeneralRe: Assign themes programmatically - Master Pages Pin
Abhijit Jana19-Apr-10 20:41
professionalAbhijit Jana19-Apr-10 20:41 
AnswerRe: Assign themes programmatically - Master Pages Pin
Tej Aj19-Apr-10 21:41
Tej Aj19-Apr-10 21:41 
AnswerRe: Assign themes programmatically - Master Pages Pin
Tej Aj20-Apr-10 0:43
Tej Aj20-Apr-10 0:43 
Question"view in browser" shortcut Pin
Yustme19-Apr-10 3:23
Yustme19-Apr-10 3:23 
AnswerRe: "view in browser" shortcut Pin
Abhijit Jana19-Apr-10 6:37
professionalAbhijit Jana19-Apr-10 6:37 
QuestionHow to Dynamically add meta keywords? Pin
123chaminda19-Apr-10 1:35
123chaminda19-Apr-10 1:35 

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.