I am new to using class file and I am trying to use a void that will create a message box like action via JS to be able to call on, but I don't know if I can or how to reference the calling page to "add the label". I of course would also like to use this for other tasks, so please don't just poop on my method, I know its not the best, but right now its what I have.
Example of the class file as it is now.
namespace Profiles
{
public class WSS_SQL
{
public void msgBox_error(String message)
{
Label msgBox = new Label();
String msg = message;
msgBox.Text = "<" + "script language='javascript'>" + Environment.NewLine + "window.alert('" + msg + "') </" + "script>";
Page.Controls.Add(msgBox);
}
}
}
...
Go to the complete details ...