更新文本字段时出现问题。 [英] Problem in Updating text field.
本文介绍了更新文本字段时出现问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个用户artilces detials的表单,在页面加载时我从数据库加载数据并设置到文本字段,现在我还删除并更新按钮。
当我执行删除操作时它成功运行并删除数据。但是当我在文本中输入更多文本并按下更新按钮时,操作成功完成,但数据库中的基础数据不会更新。
I have a form for user artilces detials, on page load i load the data from database and set into the text field, now i have also delete and update button.
When i perform delete operation it successfully runs and delete the data. but when i enter more text in the text with and press update button, the operation completed successfully, but the underlying data in the database doesn't updates.
Create Proc uspuserupdatearticle
@success bit out,
@articleid int, @Body varchar(1000),@Title varchar(50),@Categories varchar(30)
AS
BEGIN
SET NOCOUNT ON;
BEGIN TRY
UPDATE TblArticles SET Title = @Title , Body = @Body , Categories = @Categories ,UpdatedOn = GETDATE() WHERE ArticleID = @articleid
SET @success = 1
END TRY
BEGIN CATCH
SET @success = 0
END CATCH
END
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
using System.IO;
public partial class User_articledetails : System.Web.UI.Page
{
DBClass db1 = new DBClass();
Boolean success;
protected void Page_Load(object sender, EventArgs e)
{
ViewState["articleid"] = Convert.ToInt32(Request.QueryString["ID"]);
if (Session["UserName"] != null && Session["UserID"] != null)
{
//Retrieving UserName from Session
ViewState["UserName"] = Convert.ToString(Session["UserName"]);
ViewState["UserID"] = Convert.ToInt32(Session["UserID"]);
Session["UserName"] = Convert.ToString(ViewState["UserName"]);
Session["UserID"] = Convert.ToInt32(ViewState["UserID"]);
}
LoadArticleData();
}
private void LoadArticleData()
{
try{
db1.sqlcmd = new SqlCommand("uspgetspecificarticledetails");
using (SqlDataAdapter sda = new SqlDataAdapter())
{
db1.sqlcmd.CommandType = CommandType.StoredProcedure;
db1.sqlcmd.Parameters.AddWithValue("@articleid", Convert.ToInt32(ViewState["articleid"]));
db1.sqlcmd.Parameters.Add("@Title", SqlDbType.VarChar, 50);
db1.sqlcmd.Parameters["@Title"].Direction = ParameterDirection.Output;
db1.sqlcmd.Parameters.Add("@Body", SqlDbType.VarChar, 1000);
db1.sqlcmd.Parameters["@Body"].Direction = ParameterDirection.Output;
db1.sqlcmd.Parameters.Add("@Categories", SqlDbType.VarChar, 30);
db1.sqlcmd.Parameters["@Categories"].Direction = ParameterDirection.Output;
db1.sqlcmd.Parameters.Add("@PublishedOn", SqlDbType.DateTime);
db1.sqlcmd.Parameters["@PublishedOn"].Direction = ParameterDirection.Output;
db1.sqlcmd.Parameters.Add("@UpdatedOn", SqlDbType.DateTime);
db1.sqlcmd.Parameters["@UpdatedOn"].Direction = ParameterDirection.Output;
db1.sqlcmd.Parameters.Add("@countlikes", SqlDbType.BigInt);
db1.sqlcmd.Parameters["@countlikes"].Direction = ParameterDirection.Output;
db1.sqlcmd.Parameters.Add("@success", SqlDbType.Bit);
db1.sqlcmd.Parameters["@success"].Direction = ParameterDirection.Output;
db1.sqlcmd.Connection = db1.sqlcon;
db1.sqlcon.Open();
db1.sqlcmd.ExecuteScalar();
ViewState["Title"] = Convert.ToString(db1.sqlcmd.Parameters["@Title"].Value);
ViewState["body"] = Convert.ToString(db1.sqlcmd.Parameters["@Body"].Value);
ViewState["Category"] = Convert.ToString(db1.sqlcmd.Parameters["@Categories"].Value);
ViewState["PublishedOn"] = Convert.ToString(db1.sqlcmd.Parameters["@PublishedOn"].Value);
ViewState["UpdatedOn"] = Convert.ToString(db1.sqlcmd.Parameters["@UpdatedOn"].Value);
ViewState["likes"] = db1.sqlcmd.Parameters["@countlikes"].Value;
success = Convert.ToBoolean(db1.sqlcmd.Parameters["@success"].Value);
}}
catch(Exception ex)
{
Response.Write(ex);
}
finally{
if(success == true)
{
tbtitle.Text = Convert.ToString(ViewState["Title"]);
tbbody.Text = Convert.ToString(ViewState["body"]);
tbcategory.Text = Convert.ToString(ViewState["Category"]);
lblpublishedon.Text = Convert.ToString(ViewState["PublishedOn"]);
if (Convert.ToString(ViewState["UpdatedOn"]) == Convert.ToString(System.DateTime.Now))
{
lblupdatedon.Text = "Not Yet Updatedd";
}
else
{ lblupdatedon.Text = Convert.ToString(ViewState["UpdatedOn"]); }
if (Convert.ToInt64(ViewState["likes"]) == 1)
{
lbllikes.Text = "0";
}
else
{ lbllikes.Text = Convert.ToString(Convert.ToInt64(ViewState["likes"])); }
db1.sqlcon.Close();
}
else
{
}
}
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
Response.Write(ViewState["articleid"]);
try
{
db1.sqlcmd = new SqlCommand("uspuserupdatearticle");
using (SqlDataAdapter sda = new SqlDataAdapter())
{
db1.sqlcmd.CommandType = CommandType.StoredProcedure;
db1.sqlcmd.Parameters.AddWithValue("@articleid", Convert.ToInt32(ViewState["articleid"]));
//db1.sqlcmd.Parameters.AddWithValue("@Body", Convert.ToString(tbbody.Text.Trim()));
db1.sqlcmd.Parameters.AddWithValue("@Body", "Body from app");
Response.Write(tbbody.Text.Trim());
//db1.sqlcmd.Parameters.AddWithValue("@Title", Convert.ToString(tbtitle.Text.Trim()));
db1.sqlcmd.Parameters.AddWithValue("@Title", "Title from app");
Response.Write(tbtitle.Text.Trim());
//db1.sqlcmd.Parameters.AddWithValue("@Categories", Convert.ToString(tbcategory.Text.Trim()));
db1.sqlcmd.Parameters.AddWithValue("@Categories", "category from app");
Response.Write(tbcategory.Text.Trim());
db1.sqlcmd.Parameters.Add("@success", SqlDbType.Bit);
db1.sqlcmd.Parameters["@success"].Direction = ParameterDirection.Output;
db1.sqlcmd.Connection = db1.sqlcon;
db1.sqlcon.Open();
db1.sqlcmd.ExecuteScalar();
success = Convert.ToBoolean(db1.sqlcmd.Parameters["@success"].Value);
}
}
catch (Exception ex)
{
Response.Write(ex);
}
finally
{
if (success == true)
{
Response.Write("Updatation Successfull");
//Response.Redirect(Request.RawUrl);
}
else
{
Response.Write("Updation Un-Successfull");
}
}
}
protected void btndelete_Click(object sender, EventArgs e)
{
try
{
db1.sqlcmd = new SqlCommand("uspuserdeletearticles");
using (SqlDataAdapter sda = new SqlDataAdapter())
{
db1.sqlcmd.CommandType = CommandType.StoredProcedure;
db1.sqlcmd.Parameters.AddWithValue("@articleid", Convert.ToInt32(ViewState["articleid"]));
db1.sqlcmd.Parameters.Add("@success", SqlDbType.Bit);
db1.sqlcmd.Parameters["@success"].Direction = ParameterDirection.Output;
db1.sqlcmd.Connection = db1.sqlcon;
db1.sqlcon.Open();
db1.sqlcmd.ExecuteScalar();
success = Convert.ToBoolean(db1.sqlcmd.Parameters["@success"].Value);
}
}
catch (Exception ex)
{
Response.Write(ex);
}
finally
{
if (success == true)
{
Response.Write("Deleteiton Successfull");
Response.Redirect("../User/Mynotifications.aspx");
}
else
{
Response.Write("Deleteiton Un-Successfull");
}
}
}
}
<%@ Page Title="" Language="C#" MasterPageFile="~/User/Users.master" AutoEventWireup="true" CodeFile="articledetails.aspx.cs" Inherits="User_articledetails" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div style="width: 99.6%; height: 925px; border: 1px ridge black; text-align: center; vertical-align: middle;">
<%-- Div Heading--%>
<div style="width: 100%; height: 30px; line-height: 30px; font-family: Calibri; font-size: x-large; font-weight: lighter; font-style: normal; font-variant: small-caps; text-transform: uppercase; color: #FFFFFF; text-decoration: none; background-color: #000000;">
<asp:Label ID="Label11" runat="server" Text="Post Article"></asp:Label>
</div>
<div style="width: 98%; height: 665px; margin: 0 auto; margin-removed 10px;">
<%--1st Row--%>
<div style="width: 12%; height: 25px; line-height: 25px; float: left; margin-removed 20px; text-align: right; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;">
<asp:Label ID="Label1" runat="server" Text="Title" ForeColor="Black"></asp:Label>
</div>
<div style="width: 80%; height: 25px; line-height: 25px; float: left; margin-removed 5%; margin-removed 20px; text-align: left;">
<asp:TextBox ID="tbtitle" runat="server" CssClass="TextBoxClass" Width="95%" Height="25px" placeholder="Enter Your Article Title with only 20 to 50 chracters"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidatortitle" runat="server" Display="None" ControlToValidate="tbtitle" Text="*" ErrorMessage="Please Input Article Title" ForeColor="Red" Font-Names="Calibri"></asp:RequiredFieldValidator>--%>
<%--<asp:RegularExpressionValidator ID="RegularExpressionValidatortitle" runat="server" Display="None" ControlToValidate="tbtitle" ValidationExpression="^[a-zA-Z''-'\s]{20,50}$" ErrorMessage="Article Title Name Must Contain Only 20-50 Characters" Text="*" Font-Names="Calibri" Font-Size="Small" ForeColor="Red"></asp:RegularExpressionValidator>--%>
</div>
<%--2nd Row--%>
<div style="width: 12%; height: 25px; line-height: 25px; float: left; margin-removed 20px; text-align: right; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;">
<asp:Label ID="Label2" runat="server" Text="Body" ForeColor="Black"></asp:Label>
</div>
<div style="width: 80%; height: 300px; line-height: 20px; float: left; margin-removed 5%; margin-removed 20px; text-align: left;">
<asp:TextBox ID="tbbody" runat="server" CssClass="TextBoxClass" Width="95%" Height="300px" placeholder="Enter Your Article body with only 50 to 500 chracters" MaxLength="500" Rows="60" TextMode="MultiLine"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidatorbody" runat="server" Display="None" ControlToValidate="tbbody" Text="*" ErrorMessage="Please Input Article Title" ForeColor="Red" Font-Names="Calibri"></asp:RequiredFieldValidator>--%>
<%--<asp:RegularExpressionValidator ID="RegularExpressionValidatorbody" runat="server" Display="None" ControlToValidate="tbbody" ValidationExpression="^.{50,500}$" ErrorMessage="Article Body Name Must Contain Only 50-500 Characters" Text="*" Font-Names="Calibri" Font-Size="Small" ForeColor="Red"></asp:RegularExpressionValidator>--%>
</div>
<%--3rd Row--%>
<%--4th Row--%>
<div style="width: 12%; height: 25px; line-height: 25px; float: left; margin-removed 20px; text-align: right; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;">
<asp:Label ID="Label4" runat="server" Text="Category" ForeColor="Black"></asp:Label>
</div>
<div style="width: 80%; height: 25px; line-height: 25px; float: left; margin-removed 5%; margin-removed 20px; text-align: left;">
<asp:TextBox ID="tbcategory" runat="server" CssClass="TextBoxClass" Width="95%" Height="25px" placeholder="Enter Your Article Title with only 5 to 30 chracters"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidatorcategory" Display="None" runat="server" ControlToValidate="tbcategory" Text="*" ErrorMessage="Please Input Article Category" ForeColor="Red" Font-Names="Calibri"></asp:RequiredFieldValidator>
<%--<asp:RegularExpressionValidator ID="RegularExpressionValidatorcategory" runat="server" ControlToValidate="tbcategory" ValidationExpression="^[a-zA-Z''-'\s]{5,30}$" ErrorMessage="Article Title Name Must Contain Only 1-50 Characters" Text="*" Font-Names="Calibri" Font-Size="Small" ForeColor="Red"></asp:RegularExpressionValidator>--%>
</div>
<%--5th Row--%>
<div style="width: 12%; height: 25px; line-height: 25px; float: left; margin-removed 20px; text-align: right; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;">
<asp:Label ID="Label5" runat="server" Text="Published On" ForeColor="Black"></asp:Label>
</div>
<div style="width: 30%; height: 25px; line-height: 25px; float: left; margin-removed 5%; margin-removed 20px; text-align: left;">
<asp:Label ID="lblpublishedon" runat="server" ForeColor="Black"></asp:Label>
</div>
<div style="width: 12%; height: 25px; line-height: 25px; float: left; margin-removed 20px; margin-removed 5%; text-align: right; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;">
<asp:Label ID="Label6" runat="server" Text="Updated On" ForeColor="Black"></asp:Label>
</div>
<div style="width: 30%; height: 25px; line-height: 25px; float: left; margin-removed 5%; margin-removed 20px; text-align: left;">
<asp:Label ID="lblupdatedon" runat="server" ForeColor="Black"></asp:Label>
</div>
<%--5th Row--%>
<div style="width: 12%; height: 25px; line-height: 25px; float: left; margin-removed 20px; text-align: right; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;">
<asp:Label ID="Label7" runat="server" Text="Likes" ForeColor="Black"></asp:Label>
</div>
<div style="width: 30%; height: 25px; line-height: 25px; float: left; margin-removed 5%; margin-removed 20px; text-align: left;">
<asp:Label ID="lbllikes" runat="server" ForeColor="Black"></asp:Label>
</div>
<div style="width: 12%; height: 25px; line-height: 25px; float: left; margin-removed 20px; margin-removed 5%; text-align: right; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;">
</div>
<div style="width: 30%; height: 25px; line-height: 25px; float: left; margin-removed 5%; margin-removed 20px; text-align: left;">
</div>
<%--7th Row--%>
<div style="width: 100%; height: 25px; line-height: 25px; float: left; margin-removed 30px; text-align: center; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;">
<asp:Button ID="btnUpdate" runat="server" CssClass="BtnClass" Text="SAVE" Width="80px" Height="25px" OnClick="btnUpdate_Click" />
<asp:Button ID="btndelete" runat="server" CssClass="BtnClass" Text="DELETE" Width="80px" Height="25px" OnClick="btndelete_Click" />
</div>
</div>
</div>
</asp:Content>
推荐答案
\" ErrorMessage=\"Article Title Name Must Contain Only 20-50 Characters\" Text=\"*\" Font-Names=\"Calibri\" Font-Size=\"Small\" ForeColor=\"Red\"></asp:RegularExpressionValidator>--%>
</div>
<%--2nd Row--%>
<div style=\"width: 12%;身高:25px; line-height: 25px;向左飘浮; margin-removed 20px; text-align:right; font-variant: small-caps; font-style:normal; font-weight:打火机; text-transform:大写;颜色:#000000; font-family: 'Carrois Gothic'; font-size: medium;\">
<asp:Label ID=\"Label2\" runat=\"server\" Text=\"Body\" ForeColor=\"Black\"></asp:Label>
& lt;/div>
<div style=\"width: 80%;身高:300px;行高:20px;向左飘浮; margin-removed 5%; margin-removed 20px; text-align: left;\">
<asp:TextBox ID=\"tbbody\" runat=\"server\" CssClass=\"TextBoxClass\" Width=\"95%\" Height=\"300px\" placeholder=\"Enter Your Article body with only 50 to 500 chracters\" MaxLength=\"500\" Rows=\"60\" TextMode=\"MultiLine\"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID=\"RequiredFieldValidatorbody\" runat=\"server\" Display=\"None\" ControlToVa lidate=\"tbbody\" Text=\"*\" ErrorMessage=\"Please Input Article Title\" ForeColor=\"Red\" Font-Names=\"Calibri\"></asp:RequiredFieldValidator>--%>
<%--<asp:RegularExpressionValidator ID=\"RegularExpressionValidatorbody\" runat=\"server\" Display=\"None\" ControlToValidate=\"tbbody\" ValidationExpression=\"^.{50,500}
" ErrorMessage="Article Title Name Must Contain Only 20-50 Characters" Text="*" Font-Names="Calibri" Font-Size="Small" ForeColor="Red"></asp:RegularExpressionValidator>--%> </div> <%--2nd Row--%> <div style="width: 12%; height: 25px; line-height: 25px; float: left; margin-removed 20px; text-align: right; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;"> <asp:Label ID="Label2" runat="server" Text="Body" ForeColor="Black"></asp:Label> </div> <div style="width: 80%; height: 300px; line-height: 20px; float: left; margin-removed 5%; margin-removed 20px; text-align: left;"> <asp:TextBox ID="tbbody" runat="server" CssClass="TextBoxClass" Width="95%" Height="300px" placeholder="Enter Your Article body with only 50 to 500 chracters" MaxLength="500" Rows="60" TextMode="MultiLine"></asp:TextBox> <%--<asp:RequiredFieldValidator ID="RequiredFieldValidatorbody" runat="server" Display="None" ControlToValidate="tbbody" Text="*" ErrorMessage="Please Input Article Title" ForeColor="Red" Font-Names="Calibri"></asp:RequiredFieldValidator>--%> <%--<asp:RegularExpressionValidator ID="RegularExpressionValidatorbody" runat="server" Display="None" ControlToValidate="tbbody" ValidationExpression="^.{50,500}
\" ErrorMessage=\"Article Body Name Must Contain Only 50-500 Characters\" Text=\"*\" Font-Names=\"Calibri\" Font-Size=\"Small\" ForeColor=\"Red\"></asp:RegularExpressionValidator>--%>
</div>
<%--3rd Row--%>
<%--4th Row--%>
<div style=\"width: 12%;身高:25px; line-height: 25px;向左飘浮; margin-removed 20px; text-align:right; font-variant: small-caps; font-style:normal; font-weight:打火机; text-transform:大写;颜色:#000000; font-family: 'Carrois Gothic'; font-size: medium;\">
<asp:Label ID=\"Label4\" runat=\"server\" Text=\"Category\" ForeColor=\"Black\"></asp:Label>
</div>
<div style=\"width: 80%;身高:25px; line-height: 25px;向左飘浮; margin-removed 5%; margin-removed 20px; text-align: left;\">
<asp:TextBox ID=\"tbcategory\" runat=\"server\" CssClass=\"TextBoxClass\" Width=\"95%\" Height=\"25px\" placeholder=\"Enter Your Article Title with only 5 to 30 chracters\"></asp:TextBox>
<asp:RequiredFieldValidator ID=\"RequiredFieldValidatorcategory\" Display=\"None\" runat=\"server\" ControlToValidate=\"tbcategory\" Text=\"*\" ErrorMessage=\"Please Input Article Category\" ForeColor=\"Red\" Font-Names=\"Calibri\"></asp:RequiredFieldValidator>
&l t;%--<asp:RegularExpressionValidator ID=\"RegularExpressionValidatorcategory\" runat=\"server\" ControlToValidate=\"tbcategory\" ValidationExpression=\"^[a-zA-Z''-'\s]{5,30}
" ErrorMessage="Article Body Name Must Contain Only 50-500 Characters" Text="*" Font-Names="Calibri" Font-Size="Small" ForeColor="Red"></asp:RegularExpressionValidator>--%> </div> <%--3rd Row--%> <%--4th Row--%> <div style="width: 12%; height: 25px; line-height: 25px; float: left; margin-removed 20px; text-align: right; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;"> <asp:Label ID="Label4" runat="server" Text="Category" ForeColor="Black"></asp:Label> </div> <div style="width: 80%; height: 25px; line-height: 25px; float: left; margin-removed 5%; margin-removed 20px; text-align: left;"> <asp:TextBox ID="tbcategory" runat="server" CssClass="TextBoxClass" Width="95%" Height="25px" placeholder="Enter Your Article Title with only 5 to 30 chracters"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidatorcategory" Display="None" runat="server" ControlToValidate="tbcategory" Text="*" ErrorMessage="Please Input Article Category" ForeColor="Red" Font-Names="Calibri"></asp:RequiredFieldValidator> <%--<asp:RegularExpressionValidator ID="RegularExpressionValidatorcategory" runat="server" ControlToValidate="tbcategory" ValidationExpression="^[a-zA-Z''-'\s]{5,30}
\" ErrorMessage=\"Article Title Name Must Contain Only 1-50 Characters\" Text=\"*\" Font-Names=\"Calibri\" Font-Size=\"Small\" ForeColor=\"Red\"></asp:RegularExpressionValidator>--%>
</div>
<%--5th Row--%>
<div style=\"width: 12%;身高:25px; line-height: 25px;向左飘浮; margin-removed 20px; text-align:right; font-variant: small-caps; font-style:normal; font-weight:打火机; text-transform:大写;颜色:#000000; font-family: 'Carrois Gothic'; font-size: medium;\">
<asp:Label ID=\"Label5\" runat=\"server\" Text=\"Published On\" ForeColor=\"Black\"></asp:Label>
</div>
<div style=\"width: 30%;身高:25px; line-height: 25px;向左飘浮; margin-removed 5%; margin-removed 20px; text-align: left;\">
<asp:Label ID=\"lblpublishedon\" runat=\"server\" ForeColor=\"Black\"></asp:Label>
</div>
<div style=\"width: 12%;身高:25px; line-height: 25px;向左飘浮; margin-removed 20px; margin-removed 5%; text-align:right; font-variant: small-caps; font-style:normal; font-weight:打火机; text-transform:大写;颜色:#000000; font-family: 'Carrois Gothic'; font-size: medium;\">
<asp:Label ID=\"Label6\" runat=\"server\" Text=\"Updated On\" ForeColor=\"Black\"></asp:Label>
</div>
<div style=\"width: 30%;身高:25px; line-height: 25px;向左飘浮; margin-removed 5%; margin-removed 20px; text-align: left;\">
<asp:Label ID=\"lblupdatedon\" runat=\"server\" ForeColor=\"Black\"></asp:Label>
</div>
< %--5th Row--%>
<div style=\"width: 12%;身高:25px; line-height: 25px;向左飘浮; margin-removed 20px; text-align:right; font-variant: small-caps; font-style:normal; font-weight:打火机; text-transform:大写;颜色:#000000; font-family: 'Carrois Gothic'; font-size: medium;\">
<asp:Label ID=\"Label7\" runat=\"server\" Text=\"Likes\" ForeColor=\"Black\"></asp:Label>
</div>
<div style=\"width: 30%;身高:25px; line-height: 25px;向左飘浮; margin-removed 5%; margin-removed 20px; text-align: left;\">
<asp:Label ID=\"lbllikes\" runat=\"server\" ForeColor=\"Black\"></asp:Label>
</div>
<div style=\"width: 12%;身高:25px; line-height: 25px;向左飘浮; margin-removed 20px; margin-removed 5%; text-align:right; font-variant: small-caps; font-style:normal; font-weight:打火机; text-transform:大写;颜色:#000000; font-family: 'Carrois Gothic'; font-size: medium;\">
</div>
<div style=\"width: 30%;身高:25px; line-height: 25px;向左飘浮; margin-removed 5%; margin-removed 20px; text-align: left;\">
</div>
<%--7th Row--%>
<div style=\"width: 100%;身高:25px; line-height: 25px;向左飘浮; margin-removed 30px; text-align:center; font-variant: small-caps; font-style:normal; font-weight:打火机; text-transform:大写;颜色:#000000; font-family: 'Carrois Gothic'; font-size: medium;\">
<asp:Button ID=\"btnUpdate\" runat=\"server\" CssClass=\"BtnClass\" Text=\"SAVE\" Width=\"80px\" Height=\"25px\" OnClick=\"btnUpdate_Click\" />
<asp:Button ID=\"btndelete\" runat=\"server\" CssClass=\"BtnClass\"Text=\"DELETE\" Width=\"80px\" Height=\"25px\" OnClick=\"btndelete_Click\" />
</div>
</div>
</div>
</asp:Content>
" ErrorMessage="Article Title Name Must Contain Only 1-50 Characters" Text="*" Font-Names="Calibri" Font-Size="Small" ForeColor="Red"></asp:RegularExpressionValidator>--%> </div> <%--5th Row--%> <div style="width: 12%; height: 25px; line-height: 25px; float: left; margin-removed 20px; text-align: right; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;"> <asp:Label ID="Label5" runat="server" Text="Published On" ForeColor="Black"></asp:Label> </div> <div style="width: 30%; height: 25px; line-height: 25px; float: left; margin-removed 5%; margin-removed 20px; text-align: left;"> <asp:Label ID="lblpublishedon" runat="server" ForeColor="Black"></asp:Label> </div> <div style="width: 12%; height: 25px; line-height: 25px; float: left; margin-removed 20px; margin-removed 5%; text-align: right; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;"> <asp:Label ID="Label6" runat="server" Text="Updated On" ForeColor="Black"></asp:Label> </div> <div style="width: 30%; height: 25px; line-height: 25px; float: left; margin-removed 5%; margin-removed 20px; text-align: left;"> <asp:Label ID="lblupdatedon" runat="server" ForeColor="Black"></asp:Label> </div> <%--5th Row--%> <div style="width: 12%; height: 25px; line-height: 25px; float: left; margin-removed 20px; text-align: right; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;"> <asp:Label ID="Label7" runat="server" Text="Likes" ForeColor="Black"></asp:Label> </div> <div style="width: 30%; height: 25px; line-height: 25px; float: left; margin-removed 5%; margin-removed 20px; text-align: left;"> <asp:Label ID="lbllikes" runat="server" ForeColor="Black"></asp:Label> </div> <div style="width: 12%; height: 25px; line-height: 25px; float: left; margin-removed 20px; margin-removed 5%; text-align: right; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;"> </div> <div style="width: 30%; height: 25px; line-height: 25px; float: left; margin-removed 5%; margin-removed 20px; text-align: left;"> </div> <%--7th Row--%> <div style="width: 100%; height: 25px; line-height: 25px; float: left; margin-removed 30px; text-align: center; font-variant: small-caps; font-style: normal; font-weight: lighter; text-transform: uppercase; color: #000000; font-family: 'Carrois Gothic'; font-size: medium;"> <asp:Button ID="btnUpdate" runat="server" CssClass="BtnClass" Text="SAVE" Width="80px" Height="25px" OnClick="btnUpdate_Click" /> <asp:Button ID="btndelete" runat="server" CssClass="BtnClass" Text="DELETE" Width="80px" Height="25px" OnClick="btndelete_Click" /> </div> </div> </div> </asp:Content>
这篇关于更新文本字段时出现问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文