2

I am trying to implement a web page that will on an asp.net submit button click will go to the server to add a row to the SQL database table. After that, on that same page, I want to be able to display the columnID as an alert using javascript (this has to be javascript). Is this possible? Any help would be appreciated.

1
  • Through ajax/async postback or normal postback? Commented Apr 28, 2009 at 2:41

1 Answer 1

0

Another trick picked up from Telerik was to create a asp:Label and place it at the top of the page. From code behind you then set the text to javascript command:

aspLabel.Text = "JavascriptFunction();";

When your page reloads, it will execute the Javascript function. It seems that in your case your just interested in displaying and alert, so registering scripts should not be necessary. In your case you can do the following:

aspLabel.Text = "alert('" + yourValue.ToString() + "');";
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.