Thanks everybody who tried to help.
I decided to use Javascript.
Here is a code excerpt of the aspx-File:
<script type="text/javascript" language="javascript">
String.Format = function () {
var s = arguments[0];
for (var i = 0; i < arguments.length - 1; i++) {
var reg = new RegExp("\\{" + i + "\\}", "gm");
s = s.replace(reg, arguments[i + 1]);
}
return s;
};
var dialogConfirmed = false;
function SetDialogConfirmedFalse() {
dialogConfirmed = false;
}
function ConfirmDialog(obj, title, dialogText) {
if (!dialogConfirmed) {
$('body').append(String.Format("<div id='dialog' title='{0}'><p>{1}</p></div>",
title, dialogText));
$('#dialog').dialog({
height: 110,
modal: true,
resizable: false,
draggable: false,
close: function (event, ui) { $('body').find('#dialog').remove(); },
buttons:
{
'Ja': function () {
$('#dialog').dialog('close');
dialogConfirmed = true;
if (obj) obj.click();
},
'Nein': function () {
$('#dialog').dialog('close');
}
}
});
$(".ui-widget").css({ "font-size": +18 + "px" });
}
return dialogConfirmed;
}
Code behind the in CS-File int he Eventhandler which throws this popup:
var script = "ConfirmDialog(this, '" + CommonRes.Attention +
"Wollen Sie wirklich beenden?");";
ScriptManager.RegisterStartupScript(this, GetType(), Guid.NewGuid().ToString(), script, true);
My next question is: How can I get the return value what was being pressed of the javascript function to use it in the cs-File?
Thanking you in anticipation!