XiaoYong Dai – MSFT:Hi
I had taken part in Asset Manage System project and programmed similar module, your problem looks weird. It would be great if you can paste your "Add" page for investigation.
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<%@ Assembly src="/includes/MM_XSLTransform/MM_XSLTransform.vb" %>
<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO dbo.prospect_list (lastname, firstname, address, city, ""state"", zip, phone, email, homechurch, notes, firstdate, lastdate) VALUES (@lastname, @firstname, @address, @city, @state, @zip, @phone, @email, @homechurch, @notes, @firstdate, @lastdate)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_EXAMPLE") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_EXAMPLE") %>'
Expression='<%# Request.Form("MM_insert") = "prospect_add" %>'
CreateDataSet="false"
SuccessURL='<%# "/ecomm/prospects_add.aspx" %>'
Debug="true" >
<Parameters>
<Parameter Name="@lastname" Value='<%# IIf((Request.Form("lastname") <> Nothing), Request.Form("lastname"), "") %>' Type="VarChar" />
<Parameter Name="@firstname" Value='<%# IIf((Request.Form("firstname") <> Nothing), Request.Form("firstname"), "") %>' Type="VarChar" />
<Parameter Name="@address" Value='<%# IIf((Request.Form("address") <> Nothing), Request.Form("address"), "") %>' Type="VarChar" />
<Parameter Name="@city" Value='<%# IIf((Request.Form("city") <> Nothing), Request.Form("city"), "") %>' Type="VarChar" />
<Parameter Name="@state" Value='<%# IIf((Request.Form("state") <> Nothing), Request.Form("state"), "") %>' Type="VarChar" />
<Parameter Name="@zip" Value='<%# IIf((Request.Form("zip") <> Nothing), Request.Form("zip"), "") %>' Type="VarChar" />
<Parameter Name="@phone" Value='<%# IIf((Request.Form("phone") <> Nothing), Request.Form("phone"), "") %>' Type="VarChar" />
<Parameter Name="@email" Value='<%# IIf((Request.Form("email") <> Nothing), Request.Form("email"), "") %>' Type="VarChar" />
<Parameter Name="@homechurch" Value='<%# IIf((Request.Form("homechurch") <> Nothing), Request.Form("homechurch"), "") %>' Type="VarChar" />
<Parameter Name="@notes" Value='<%# IIf((Request.Form("notes") <> Nothing), Request.Form("notes"), "") %>' Type="VarChar" />
<Parameter Name="@firstdate" Value='<%# IIf((Request.Form("firstdate") <> Nothing), Request.Form("firstdate"), "") %>' Type="VarChar" />
<Parameter Name="@lastdate" Value='<%# IIf((Request.Form("lastdate") <> Nothing), Request.Form("lastdate"), "") %>' Type="VarChar" />
</Parameters>
</MM:Insert>
<MM:DataSet
id="prospect_list"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_EXAMPLE") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_EXAMPLE") %>'
CommandText='<%# "SELECT dbo.prospect_list.prospect_id, dbo.prospect_list.firstname, dbo.prospect_list.address, dbo.prospect_list.city, dbo.prospect_list.""state"", dbo.prospect_list.zip, dbo.prospect_list.phone, dbo.prospect_list.email, dbo.prospect_list.homechurch, dbo.prospect_list.notes, dbo.prospect_list.firstdate, dbo.prospect_list.lastdate FROM dbo.prospect_list" %>'
Debug="true"
>
<EditOps>
<EditOpsTable Name="dbo.prospect_list" />
<Parameter Name="prospect_id" Type="Int" IsPrimary="true" />
</EditOps>
</MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<html><!-- InstanceBegin template="/Templates/one_column_protected.dwt.aspx" codeOutsideHTMLIsLocked="false" -->
<head>
<script type="text/javascript" runat="server">
Private Sub logoff_Click(ByVal sender as System.Object, ByVal e As System.EventArgs)
FormsAuthentication.SignOut()
Response.Redirect("/logoff.aspx")
End Sub
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Martin Luther Church Ministry Teams</title>
<!-- InstanceEndEditable -->
<META NAME="ROBOTS" CONTENT="NONE">
<!-- InstanceBeginEditable name="head" -->
<link href="/css/styles.css" rel="stylesheet" type="text/css" />
<link href="/css/dropshadow.css" rel="stylesheet" type="text/css" />
<!-- InstanceEndEditable -->
</head>
<body>
<table align="center" class="navcell">
<tr>
<td class="banner"> </td>
</tr>
<tr>
<td><!--#include file="../navigation_inc.html" --></td>
</tr>
<tr>
<td class="maintext">
<!-- InstanceBeginEditable name="Main" -->
<table width="100%">
<tr>
<td>
<form runat="server">
<table width="100%">
<tr>
<td><h1>Add Prospect </h1></td>
</tr>
<tr>
<td class="logoff">
<asp:linkbutton ID="logoff" runat="server" Text="[logoff]" OnClick="logoff_Click" ></asp:linkbutton>
</td>
</tr>
<tr>
<td>
<div id="shadow-container">
<div class="shadow1">
<div class="shadow2">
<div class="shadow3">
<div class="container">
<table width="100%" border="0" cellpadding="0" cellspacing="5" class="prosform" Text='<%# prospect_list.FieldValue("firstname", Container) %>' runat="server">
<tr>
<td valign="top"><p align="right">Last Name </p></td>
<td valign="top"><p>
<asp:TextBox BackColor="#FFFFFF" BorderColor="#999999" BorderWidth="1" Columns="1" ID="lastname" runat="server" TextMode="SingleLine" Wrap="false" class="datagridbox" />
</p></td>
</tr>
<tr>
<td valign="top"><p align="right">First Name </p></td>
<td valign="top"><p>
<asp:TextBox BackColor="#FFFFFF" BorderColor="#999999" BorderWidth="1" Columns="1" ID="firstname" runat="server" TextMode="SingleLine" Wrap="false" class="datagridbox" />
</p></td>
</tr>
<tr>
<td valign="top"><p align="right">Address</p></td>
<td valign="top"><p>
<asp:TextBox BackColor="#FFFFFF" BorderColor="#999999" BorderWidth="1" Columns="1" ID="address" runat="server" TextMode="SingleLine" Wrap="false" class="datagridbox" />
</p></td>
</tr>
<tr>
<td valign="top"><p align="right">City</p></td>
<td valign="top"><p>
<asp:TextBox BackColor="#FFFFFF" BorderColor="#999999" BorderWidth="1" Columns="1" ID="city" runat="server" TextMode="SingleLine" Wrap="false" class="datagridbox" />
</p></td>
</tr>
<tr>
<td valign="top"><p align="right">State</p></td>
<td valign="top"><p>
<asp:TextBox BackColor="#FFFFFF" BorderColor="#999999" BorderWidth="1" Columns="1" ID="state" runat="server" TextMode="SingleLine" Wrap="false" class="datagrid50" />
</p></td>
</tr>
<tr>
<td valign="top"><p align="right">ZIP</p></td>
<td valign="top"><p>
<asp:TextBox BackColor="#FFFFFF" BorderColor="#999999" BorderWidth="1" Columns="1" ID="zip" runat="server" TextMode="SingleLine" Wrap="false" class="datagrid100" />
</p></td>
</tr>
<tr>
<td valign="top"><p align="right">Phone</p></td>
<td valign="top"><p>
<asp:TextBox BackColor="#FFFFFF" BorderColor="#999999" BorderWidth="1" Columns="1" ID="phone" runat="server" TextMode="SingleLine" Wrap="false" class="datagrid175" />
</p></td>
</tr>
<tr>
<td valign="top"><p align="right">Email</p></td>
<td valign="top"><p>
<asp:TextBox BackColor="#FFFFFF" BorderColor="#999999" BorderWidth="1" Columns="1" ID="email" runat="server" TextMode="SingleLine" Wrap="false" class="datagridbox" />
</p></td>
</tr>
<tr>
<td valign="top"><p align="right">Home Church </p></td>
<td valign="top"><p>
<asp:TextBox BackColor="#FFFFFF" BorderColor="#999999" BorderWidth="1" Columns="1" ID="homechurch" runat="server" TextMode="SingleLine" Wrap="false" class="datagridbox" />
</p></td>
</tr>
<tr>
<td valign="top"><p align="right">Notes</p></td>
<td valign="top"><p>
<asp:TextBox BackColor="#FFFFFF" BorderColor="#999999" BorderWidth="1" ID="notes" Rows="5" runat="server" TextMode="MultiLine" class="datagrid300" /></p></td>
</tr>
<tr>
<td valign="top"><p align="right">First Date Visited </p></td>
<td valign="top"><p>
<asp:TextBox BackColor="#FFFFFF" BorderColor="#999999" BorderWidth="1" Columns="1" ID="firstdate" runat="server" TextMode="SingleLine" Wrap="false" class="datagrid100" />
</p></td>
</tr>
<tr>
<td valign="top"><p align="right">Last Known Date Visited </p></td>
<td valign="top"><p>
<asp:TextBox BackColor="#FFFFFF" BorderColor="#999999" BorderWidth="1" Columns="1" ID="lastdate" runat="server" TextMode="SingleLine" Wrap="false" class="datagrid100" />
</p></td>
</tr>
<tr>
<td valign="top"> </td>
<td valign="top"><div align="right">
<input type="submit" name="Submit" value="Submit" />
</div></td>
</tr>
</table></div>
</div>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>
<table border="0" cellpadding="5" cellspacing="5">
<tr>
<td valign="bottom" class="prosnav"><a href="/ecomm/prospects.aspx" target="_top">View Master List</a></td>
<td valign="bottom" class="prosnav"><a href="/ecomm/prospects_edit.aspx" target="_top">Edit List</a></td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="prospect_add" />
</form>
</td>
</tr>
</table>
<!-- InstanceEndEditable -->
</td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>