Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<button type="submit" id="btn" name="Command" value="Cancel" onclick="location.href='<%: Url.Action("Capture", "TTSCreate") %>'" />


XML
<script>
    $("[id*=btn]").click(function (e) {
        alert('This is a custom alert box', 'Alert Dialog');

    });
</script>



[HttpPost]
public ActionResult Capture(PrtScreen prt, string command)
{

if (command == "Cancel")
{
int FileCount = 0;

//int screenWidth = Screen.GetBounds(new Point(0, 0)).Width;
//int screenHeight = Screen.GetBounds(new Point(0, 0)).Height;
Bitmap bmpScreenShot = new Bitmap(1920, 1080);
Graphics gfx = Graphics.FromImage((Image)bmpScreenShot);
gfx.CopyFromScreen(0, 0, 0, 0, new Size(1920, 1080));
bmpScreenShot.Save("d:\\example" + FileCount + ".jpg ", ImageFormat.Png);

}
Posted
Updated 31-Jul-15 2:37am
v2

1 solution

You can't modify the alert box, you'll need to use a modal popup framework instead, like jQuery UI's dialog.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900