<%@ Language=VBScript %> <%Response.Buffer=True%> <% Updated = Request.QueryString("Updated") %> <% PageTitle = "SiteManager - Product Categories" %> <% PageID=253 %> <% Header %> <% Menu PageID %> <%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <%UCategoryEdit%> <%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <% Footer %> <% Sub UCategoryEdit CatID=Request.QueryString("CID") error = "" OpenConnection1 SET rs = Server.CreateObject("ADODB.Recordset") If Request.Form("hidSave")="true" then txtCategory=Trim(Request.Form("txtCategory")) If txtCategory="" then error="Enter the new category and press Save." If error="" then SEL = "SELECT * FROM UCategories WHERE CatID=" & CatID rs.Open SEL,DB,1,3 If rs.EOF then rs.Close Response.Redirect("UCategory_Add.asp") Else rs("txtCategory")=dbReplace(txtCategory) rs.Update rs.Close Response.Redirect("UCategory_Add.asp") End If End If Else Sel="SELECT * FROM UCategories WHERE CatID=" & CatID rs.Open Sel,DB,1,3 If rs.EOF then rs.Close Response.Redirect("UCategory_Add.asp") End If txtCategory=rs("txtCategory") rs.Close End If %>

<%= FormatDateTime(Date,1) %>

<% If error <> "" then%>

<%=error%>

<% End If%>
 
Edit Category:  
 

<%End Sub %>