<% Response.buffer=True If Session("LoginName") = "" then Response.redirect "login.asp?Redirect=" &Request.Servervariables("URL") End If %> Application automobile en asp
<% IF Session("AccessLevel")<>"Admin" Then%>
Vous n'êtes pas autorisé à modifier cette page
[ retour ]
<% Else%>
 >> RENOMMER LA CATÉGORIE
<% dim intID dim strCatName dim adoCn dim strSQL set adoCn = Server.CreateObject("ADODB.Connection") adoCn.Open strConn if Request.QueryString("action") = "save" then intID = Request.Form("txtID") strCatName = Request.Form("txtCatName") strSQL = "Update Category set CatName = '" & replace(strCatName,"'","''") & "' where ID=" & intID adoCn.Execute strSQL Response.Redirect "categorievoir.asp" else %> <% intID = Request.QueryString("ID") dim adoRs set adoRs = Server.CreateObject("ADODB.Recordset") strSQL = "Select * From Category where ID=" & intID set adoRs = adoCn.Execute(strSQL) If not adoRs.EOF then strCatName = adoRs("CatName") End If adoRs.Close set adoRs = nothing end if adoCn.Close set adoCn = nothing %>
Nom de la catégorie : <%=strCatName%>
Nouveau nom :
<% End IF%>