我有一页(A)和用户控制,我谨寄送一套数据,如:
姓名
1 aa.pdf
2 bb.doc
3 cc.xls
从用户控制到我的网页
这样做些事情的最有效方式是什么?
我有一页(A)和用户控制,我谨寄送一套数据,如:
姓名
1 aa.pdf
2 bb.doc
3 cc.xls
从用户控制到我的网页
这样做些事情的最有效方式是什么?
在你想要通过的数据类型上,在<代码>User Control上创造财产,并在你创建控制权的网页上居住。
public String ControlProperty
{
get
{
return Convert.ToString(ViewState["ControlValue"]);
}
}
这样做有很多方法。 通常,法典在普通的ASCX控制中是空洞的,而控制则仅仅被拖到网页上。 间接将数据输入网页:
其中一些最常见的情况是使用。 NET gridview, datagrid, or datalist. a. 向电网本身发送数据集或数据。 这并不涉及许多工作,你可以效仿以下几个例子::http://www.c-sharpMM.com/UploadFile/mahesh/DataBledInDataGridMCB112022005207AM/DataBledInDataDataGridMC1/ 另一项涉及更多工作的方法是要求网络服务,该服务将含有浏览量清单的json物体重新定位,由客户旁打,并制作一个超文本表格。 这个问题更是你的设想是什么,是你的最佳和最合适的方法。
这简便,使你的数据成为假肢,然后将假肢解到网页上。
var myData = new Dictionary<int, String>();
myData[0]="aa.pdf";
context.Item["Data"] = myData;
//in your page.
var myData = (Dictionary<int, String>)(context.Item["Data"]);
以上代码只是原型草案,你可以在你的环境中尝试。
Sean
In my webpages I have references to js and images as such: "../../Content/Images/"Filename" In my code if I reference a file as above, it doesnt work so i have to write: "c:/miscfiles/"filename" 1-...
I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...
Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...
I m looking for best practices here. Sorry. I know it s subjective, but there are a lot of smart people here, so there ought to be some "very good" ways of doing this. I have a custom object called ...
I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...
i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...
For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?
I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!