0

I am using javascript in my asp.net project dynamically. But this error occurred: " Microsoft JScript runtime error: Object expected". Here is my code :

dropdownlist1.Attributes.Add("onchange", "return" + "confirm('Kaydetmek istediğinize emin misiniz')");

pop up is not opening. Any Idea ?

1 Answer 1

2

Change your code to this, adding a space between return and confirm. The concatenation isn't really required

dropdownlist1.Attributes.Add("onchange", "return confirm('Kaydetmek istediğinize emin misiniz')");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.