I will try my best to formulate what I am trying to do.
Let me preface by saying that I am very new to C # and ASP.NET and have minimal experience with javascript.
I have a javascript function that calls a query window. General image - if input is entered - it will be saved in the database column.
I draw a space when passing a value from the prompt window to PostBack in C #.
function newName()
{
var nName = prompt("New Name", " ");
if (nName != null)
{
if (nName == " ")
{
alert("You have to specify the new name.");
return false;
}
else
{
}
}
}
This is what I have in C #:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
else
{
}
}
I am trying to figure out how to make this call for input from a javascript function.
I spent the last few hours on the Internet and in books. It was overloaded.
EDIT
I made friends a little to match what I'm trying to do.
<asp:HiddenField ID="txtAction" runat="server" Value="" />
document.forms(0).txtAction.Value = "saveevent";
document.forms(0).submit();
trying to figure out how to insert a row into a table now .....
string nEvent = Request.Form["event"];
if (txtAction.Value == "saveevent") {
nName.Insert();
}