I tried use your code and it gave me error message: CS1010: Newline in constant Source Error: Line 185: str.Append(""); I think the error came because I tried to use it inside my C# script: if (Common.RemoveSpecialCharacters(txtOrg.Text).Equals("")) { StringBuilder str = new StringBuilder(); str.Append(""); str.Append("alert('Please enter a valid organization name.')"); str.Append(""); RegisterStartupScript("Msg",str.ToString()); //lError.Text = "Please enter a valid organization name."; //return; } Any more help please? Thanks MY
M
myohanna
@myohanna
Posts
-
unable to use <%@ import Namespace="System.Windows.Forms" %> -
unable to use <%@ import Namespace="System.Windows.Forms" %>Hi, i use this code for web development and create message box: <%@ Control Language="C#" Src="nsoftwareAS2.cs"%> <%@ import Namespace="nsoftwareAS2" %> <%@ import Namespace="System" %> <%@ import Namespace="System.Windows.Forms" %> but it shows an error message when i tried to run the site: CS0234: The type or namespace name 'Windows' does not exist in the class or namespace 'System' (are you missing an assembly reference?) How to fix it? MY