Hi All --
I really confused. I found an example using Microsoft.Samples.Alert and I open the Alert.aspx page provided and everything works fine.
When I import the dll into my project, copy the script code into my aspx page, it doesn't recognize the code and I also notice that in the aspx page provided, on the top left of page where you can pick from 'Client Objects & Events', it has Server Code and it shows the alerts I'm trying to create. I can't figure out what I'm missing.
Here is the code I'm copying into my aspx.page
<%@ Register Namespace="Microsoft.Samples.Alert" TagPrefix="ms" Assembly="Alert" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<script runat="server">
public void ServerShow(object sender, EventArgs e)
{
ServerAlert.Show();
}
public void ServerAlertChoice(object sender, AlertChoiceEventArgs e)
{
AlertResult.Text = "You clicked " + e.Result.ToString();
AlertResult.Visible = true;
}
public void ConfirmClick(object sender, EventArgs e) {
ConfirmResult.Visible = true;
}
</script>
I have the alert.dll & Alert.pdb in my bin directory and I added it using 'Add references/browse'
When I copy the exact same code, everything is underlined in blue and the errors are:
The name 'ServerAlert' does not exist in the current context
Microsoft.Samples.Alert.AlertResult does not contain a definition for Text
""" for Visible
etc.
What am I missing? It's got to be simple! I'm using Visual Web Developer 2008 Express
Thanks!