Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
GeneralGet The Time When The Program Execute Pin
DucLinh10-May-04 21:27
DucLinh10-May-04 21:27 
GeneralRe: Get The Time When The Program Execute Pin
Mazdak10-May-04 21:41
Mazdak10-May-04 21:41 
GeneralRe: Get The Time When The Program Execute Pin
DucLinh10-May-04 22:09
DucLinh10-May-04 22:09 
GeneralRe: Get The Time When The Program Execute Pin
Heath Stewart11-May-04 3:16
protectorHeath Stewart11-May-04 3:16 
Generalpopup a dialog when change drop down list selection Pin
davidlyy10-May-04 17:29
davidlyy10-May-04 17:29 
GeneralRe: popup a dialog when change drop down list selection Pin
OmegaSupreme11-May-04 0:06
OmegaSupreme11-May-04 0:06 
GeneralRe: popup a dialog when change drop down list selection Pin
Heath Stewart11-May-04 3:51
protectorHeath Stewart11-May-04 3:51 
GeneralRe: popup a dialog when change drop down list selection Pin
davidlyy11-May-04 16:46
davidlyy11-May-04 16:46 
Heath,

i try to work it out follow your way. here is the code i wrote:

in test.aspx.cs

private void Page_Load(object sender, System.EventArgs e)
{
// b1 is a invisible button will save change to database
string sCmd = Page.GetPostBackClientHyperlink(b1,"");
string script1 = "javacript: return myconfirm(" + sCmd + ")";

if (!Page.IsPostBack)
{
DropDownList1.Attributes.Add("onchange",script1);
}
}

in test.aspx

function myconfirm(cmd)
{
var agree = confirm("sure?");
if (agree)
eval(cmd);
}


but the browser always said the javascript code had errors. is there any error in string script1.

thanks.

david
GeneralRe: popup a dialog when change drop down list selection Pin
Heath Stewart12-May-04 2:41
protectorHeath Stewart12-May-04 2:41 
GeneralRe: popup a dialog when change drop down list selection Pin
davidlyy12-May-04 20:09
davidlyy12-May-04 20:09 
GeneralRe: popup a dialog when change drop down list selection Pin
Heath Stewart13-May-04 2:26
protectorHeath Stewart13-May-04 2:26 
Generalsave file dialog box in web application Pin
Marveyles10-May-04 15:48
Marveyles10-May-04 15:48 
GeneralRe: save file dialog box in web application Pin
TigerNinja_10-May-04 18:47
TigerNinja_10-May-04 18:47 
GeneralRe: save file dialog box in web application Pin
Marveyles10-May-04 18:57
Marveyles10-May-04 18:57 
GeneralRe: save file dialog box in web application Pin
Heath Stewart11-May-04 3:23
protectorHeath Stewart11-May-04 3:23 
QuestionVideo Editing Component? Pin
Tony Archer10-May-04 10:36
Tony Archer10-May-04 10:36 
AnswerRe: Video Editing Component? Pin
Roman Rodov10-May-04 14:08
Roman Rodov10-May-04 14:08 
GeneralRe: Video Editing Component? Pin
Tony Archer10-May-04 16:29
Tony Archer10-May-04 16:29 
GeneralRe: Video Editing Component? Pin
osto10-May-04 16:54
osto10-May-04 16:54 
GeneralRe: Video Editing Component? Pin
Kolich11-May-04 1:09
Kolich11-May-04 1:09 
GeneralRe: Video Editing Component? Pin
Tony Archer11-May-04 8:20
Tony Archer11-May-04 8:20 
GeneralRe: Video Editing Component? Pin
leppie11-May-04 7:18
leppie11-May-04 7:18 
GeneralRe: Video Editing Component? Pin
Tony Archer12-May-04 0:31
Tony Archer12-May-04 0:31 
QuestionHow Know if an control has added an event Pin
machocr10-May-04 10:12
machocr10-May-04 10:12 
AnswerRe: How Know if an control has added an event Pin
Heath Stewart10-May-04 10:41
protectorHeath Stewart10-May-04 10: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.