小编sri*_*ari的帖子

在html中悬停时更改选择列表选项背景颜色

是否可以在悬停时更改选择列表选项的默认背景颜色?

HTML:

<select id="select">
    <option value="1">One</option>
    <option value="2">Two</option>
    <option value="3">Three</option>
</select>
Run Code Online (Sandbox Code Playgroud)
select {
    -webkit-border-radius:25px; -moz-border-radius:25px; border-radius:25px;
}

select:hover {    
    background-color:gren;
}

option:hover {
    background-color:yellow;
}

option {
    -webkit-border-radius:25px; -moz-border-radius:25px; border-radius:25px;
    color:blue;
    background-color:yellow;
}
Run Code Online (Sandbox Code Playgroud)

我尝试过选项:hover{background-color:red;},但没用.有人知道怎么做这个吗?

html css html5 css3

29
推荐指数
1
解决办法
16万
查看次数

数据库插入错误:"字符串或二进制数据将被截断"

当我登录时,我将我的用户名存储在会话中.我的要求是我想将我的用户名存储在我的数据库中.我在这里存储它username1.输入用户名后,我可以使用response.write()它打印并完美打印.但是,当我将它存储在数据库中时,它会产生以下错误:

**sqlException was unhandled by user code
and exception at       cmd.ExecuteScalar();
String or binary data would be truncated.
The statement has been terminated.**

以下是我的ado.net代码:

using (SqlConnection con = 
    new SqlConnection("Data Source=.;database=testdb1;Integrated Security=SSPI")) {

    con.Open();
    //  SqlCommand cmd = new SqlCommand("delete from fileinfo where ID=" + Convert.ToInt32(Request.Params["one"]), con);                            

    string uname = (string) Session["fname"].ToString() + " " + Session["lname"].ToString(); //Session["fname"].ToString()+" "+Session["lname"].ToString();

    // Response.Write(uname);
    // uname = "sri hari";
    uname = uname + " ";
    string uname1 = uname; …
Run Code Online (Sandbox Code Playgroud)

c# sql-server asp.net ado.net

11
推荐指数
2
解决办法
6万
查看次数

从客户端检测到一个潜在危险的Request.Form值(textboxError ="<Responses> <Response ...")

我正在使用ozeki ng SMS网关.我无法向任何手机发送任何短信.请帮我通过网络发送短信到手机

从客户端(textboxError =检测到潜在危险的Request.Form值在Page指令或在配置部假'".设置该值后,可以随后通过设置validateRequest =禁用请求验证’.然而,这是强烈建议您的应用程序在这种情况下明确检查所有输入.有关详细信息,请参阅http://go.microsoft.com/fwlink/?LinkId=153133.

异常详细信息:System.Web.HttpRequestValidationException:从客户端检测到潜在危险的Request.Form值(textboxError ="

和我的cs文件是

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net;
using System.Text.RegularExpressions;

public partial class _Default : System.Web.UI.Page 
{


    protected void Page_Load(object sender, EventArgs e)
    {
        textboxRecipient.Width = 400;
        textboxMessage.Width = 450;
        textboxMessage.Rows = 10;
        textboxError.Width = 400;
        textboxError.Rows = 5;

        textboxError.ForeColor = System.Drawing.Color.Red;
        textboxError.Visible = false;
        textboxError.Text = "";

        if (!Page.IsPostBack)
        {
            textboxRecipient.Text = "+441234567";
            textboxMessage.Text = "Hello …
Run Code Online (Sandbox Code Playgroud)

asp.net sms sms-gateway

8
推荐指数
1
解决办法
4万
查看次数

标签 统计

asp.net ×2

ado.net ×1

c# ×1

css ×1

css3 ×1

html ×1

html5 ×1

sms ×1

sms-gateway ×1

sql-server ×1