我正在尝试使用嵌入式图像更改按钮的样式,如下面的小提琴中所示:
http://jsfiddle.net/krishnathota/xzBaZ/1/
在示例中没有图像,我担心.
我试着:
background-color禁用时更改按钮我试过去做button[disabled].但是有些效果无法禁用.喜欢
top: 1px; position: relative;和形象.
我正在使用iTextSharp在按钮点击时将面板打印成PDF.单击按钮后,PDF将下载到客户端的计算机.而不是这个我需要在浏览器中打开PDF而不是下载.用户可以从浏览器将PDF下载到他的PC.
我正在使用以下代码:
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=" + filename + ".pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
pnl_print.RenderControl(hw);
StringReader sr = new StringReader(sw.ToString());
Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 100f, 0f);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
Response.Write(pdfDoc);
Response.End();
sr.Close();
hw.Close();
sw.Close();
Run Code Online (Sandbox Code Playgroud) 我正在尝试将图像上传到我的应用程序,但它总是返回null.我在这里找不到问题.你能帮我吗?这是我的代码.
模型
[Table("Slider")]
public partial class Slider : BaseModel
{
[Required]
[StringLength(200)]
public string FileName { get; set; }
[StringLength(200)]
public string Title { get; set; }
[StringLength(1000)]
public string Description { get; set; }
public int? Order { get; set; }
}
[NotMapped]
public class SliderImage : Slider
{
public HttpPostedFileBase ImageFile { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
视图
@using (Html.BeginForm(null, null, FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
<div class="modal-body">
<div class="form-horizontal">
@Html.ValidationSummary(true, "", new { @class …Run Code Online (Sandbox Code Playgroud) asp.net-mvc file-upload httppostedfilebase twitter-bootstrap
我需要将网格视图中的值与中心和右对齐.因为我需要对齐货币.
其他列需要对齐中心和左对齐.
你能帮帮我吗?
我现在正在做这个.
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Amount">
<ItemTemplate>Rs.<%# Eval("Payable_Bill_Amount","{0:n}")%></ItemTemplate>
</asp:TemplateField>
Run Code Online (Sandbox Code Playgroud)
这使内容完全正确.我需要将内容与正确对齐,但也要与我们的计算中心对齐
例如:
Required Current
| 10.00 | | 10.00|
| 110.00 | | 110.00|
| 1210.00 | | 1210.00|
----------
Run Code Online (Sandbox Code Playgroud) 当鼠标放在GridView Row上时我需要显示工具提示(onmouseover)我需要动态设置工具提示内容 GridView_RowData
我怎样才能做到这一点??
我可以这样做e.Row.Attributes.Add(...吗?
我正在使用输出参数从存储过程返回值.
存储过程中的声明是: @GrandTtl DECIMAL(19,3) OUT
该SELECT查询:
SET @GrandTtl = (SELECT TOP 1 Bill_Amount
FROM Tbl_Restaurant_Kitchen_Order_Bill_Details
WHERE Bill_Number = @billno)
Run Code Online (Sandbox Code Playgroud)
例如,select查询返回值,4087.67然后4088从SQL Server到C#返回输出参数值.
这是调用存储过程的C#代码:
SqlCommand cmd = new SqlCommand("Sp_RestCC_BillDetails", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter OutParam26 = cmd.Parameters.Add("@GrandTtl", SqlDbType.Decimal,19);
da = new SqlDataAdapter(cmd);
con.Open();
da.Fill(ds, "dtRestCC_Items");
con.Close();
objRCCBEL.GrandTtlOut = Convert.ToDecimal(cmd.Parameters["@GrandTtl"].Value);
Run Code Online (Sandbox Code Playgroud) c# sql-server stored-procedures output-parameter sql-server-2008
我有一个包含Column的GridView ID
我有一个包含两列的DataTable
ID
DONE
Run Code Online (Sandbox Code Playgroud)
我ID将DataTable中的列绑定到GridView.直到没有它的罚款.
但是现在我需要DONE在DataTable中的Column Value 上设置GridView行的背景颜色.(如果DONE值是true行背景颜色必须更改.)
如何在不将DONERow 绑定到GridView的情况下实现此目的?
我在我的网站上使用Bootstrap.在单击注册按钮时弹出注册模式.它有一些字段,注册按钮和关闭按钮.他们的代码是
<div id="myModalRegister" runat="server" class="modal hide fade" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×</button>
<h3 id="H1">
Register</h3>
</div>
<div class="modal-body">
<i class="icon-user"></i>Email ID</label>
<input type="text" class="span3" id="txtRegEmail" runat="server" />
<br />
</div>
<div class="modal-footer">
<button class="btn btn-danger" data-dismiss="modal" aria-hidden="true">
Close</button>
<asp:Button ID="btRegister" runat="server" CssClass="btn btn-primary"
Text="Register" onclick="btRegister_Click" />
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
注册按钮是
<li class="one"><a href="#myModalRegister" role="button" data-toggle="modal" >
<i class="icon-user icon-white"></i> Sign Up</a></li>
Run Code Online (Sandbox Code Playgroud)
当我单击btRegister按钮时,Click事件未触发.你能帮助我吗??
经过一些研究后,我发现模态窗口是在Form标签之外呈现的.这就是事件没有解雇的原因.我怎么解决这个???
我需要隐藏Ribbon Control的上下文菜单

我试过了
<Ribbon.ContextMenu><ContextMenu Visibility="Hidden"></ContextMenu></Ribbon.ContextMenu>
Run Code Online (Sandbox Code Playgroud)
这在一定程度上完成了这项工作.即右键单击空白区域时禁用上下文菜单.但是当我右键单击功能区按钮时,仍然会出现上下文菜单.我怎么能禁用它?
我正在创建一个Windows应用程序.在这个应用程序中,我正在使用notifyicon并最小化我的应用程序到系统托盘.在我点击按钮的代码中,我在后台处理一些事情并每2秒返回一个整数值.我需要显示价值Notifyicon.
谁能帮我???
c# ×7
asp.net ×5
gridview ×3
.net ×1
alignment ×1
asp.net-mvc ×1
contextmenu ×1
css ×1
datatable ×1
file-upload ×1
hover ×1
modal-dialog ×1
notifyicon ×1
ribbon ×1
sql-server ×1
tooltip ×1
windows ×1
winforms ×1
wpf ×1