webforms

Add method to Array in TypeScript 1.0

南楼画角 提交于 2020-01-16 03:04:27
问题 I'm trying to create a TypeScript 1.0.2 (VS 2013 Update 2 RTM) definition file for the ASP.NET Ajax library, and I'm getting hung up on how to define the additional methods that MS Ajax adds to base JS types such as Array. I created a AspNetAjax.d.ts and a AspNetAjax-tests.ts file. When I attempt to use the "add" method in the test file, I get the compiler error that is listed below. AspNetAjax.d.ts interface Array<T> { add(array: T[], item: T): void; } AspNetAjax-tests.ts ///<reference path=

Add method to Array in TypeScript 1.0

心已入冬 提交于 2020-01-16 03:04:24
问题 I'm trying to create a TypeScript 1.0.2 (VS 2013 Update 2 RTM) definition file for the ASP.NET Ajax library, and I'm getting hung up on how to define the additional methods that MS Ajax adds to base JS types such as Array. I created a AspNetAjax.d.ts and a AspNetAjax-tests.ts file. When I attempt to use the "add" method in the test file, I get the compiler error that is listed below. AspNetAjax.d.ts interface Array<T> { add(array: T[], item: T): void; } AspNetAjax-tests.ts ///<reference path=

How to maintain long text inside RDLC report column ?

我怕爱的太早我们不能终老 提交于 2020-01-16 02:53:07
问题 I have tried a lot to maintain long text inside RDLC report's columns but it doesn't seem to be adjustable. When some long text appears inside any column then it disturbs the whole report. How to control it, so the text keeps extending downwards in proper and good manner. 回答1: Try and put a fixed Column Width and set CanGrow to False and make sure that the Row has it set on True. If that doesn't work you'll have to edit your datasource before giving it to the reporter. You must break the

ASP.NET_SessionId cookie for asp.net webform based website need GDPR compliance

假如想象 提交于 2020-01-15 09:21:11
问题 I have a website which where developed in asp.net webform few years back & due to GDPR compliance i am not sure ASP.NET_SessionId cookie need user explicit permission. Not sure what exactly ASP.NET_SessionId cookie is used it show for all asp.net website 来源: https://stackoverflow.com/questions/50442773/asp-net-sessionid-cookie-for-asp-net-webform-based-website-need-gdpr-compliance

How can I set alignment for a ListItem in a DropDownList?

痴心易碎 提交于 2020-01-14 18:51:05
问题 I have a DropDownList in my aspx file like this: <asp:DropDownList runat="server" ID="MaxRec"> <asp:ListItem>10</asp:ListItem> <asp:ListItem>50</asp:ListItem> <asp:ListItem>100</asp:ListItem> <asp:ListItem>150</asp:ListItem> <asp:ListItem Selected="True">200</asp:ListItem> </asp:DropDownList> In Chrome it renders like this: How can i set the alignment on all ListItems to be to the right so that values are properly aligned? I tried setting style="text-align:right" on the DropDownList and on

How can I set alignment for a ListItem in a DropDownList?

夙愿已清 提交于 2020-01-14 18:50:11
问题 I have a DropDownList in my aspx file like this: <asp:DropDownList runat="server" ID="MaxRec"> <asp:ListItem>10</asp:ListItem> <asp:ListItem>50</asp:ListItem> <asp:ListItem>100</asp:ListItem> <asp:ListItem>150</asp:ListItem> <asp:ListItem Selected="True">200</asp:ListItem> </asp:DropDownList> In Chrome it renders like this: How can i set the alignment on all ListItems to be to the right so that values are properly aligned? I tried setting style="text-align:right" on the DropDownList and on

DetailsView bug when binding an empty datatable?

拥有回忆 提交于 2020-01-14 12:27:31
问题 I am using .net 4.5 and I found this odd behaviour: Markup: <asp:DetailsView ID="dtvTest" AutoGenerateRows="true" DefaultMode="Insert" runat="server" /> Code: protected void Page_Load(object sender, EventArgs e) { DataTable dt = new DataTable("Test"); dt.Columns.Add("Column", typeof(string)); // If I uncomment the line it works! // dt.Rows.Add("row 1"); dtvTest.DataSource = dt; dtvTest.DataBind(); } the result is Collection cannot be null. Parameter name: c thrown on dtvTest.DataBind(). If

Webforms Autofac parameter to constructor using VB.NET

一笑奈何 提交于 2020-01-14 06:18:06
问题 So, i want to do what I feel should be such a simple task... pass in a parameter to a constructor using Autofac! However, I have managed to get a work around working, but just dont think this is correct, I feel i am chaning too much of the recommended code from the Autofac guides I am more than happy for answers in C# or VB.net it doesnt matter, the location of code is all the same So, here is my setup (im not fussed about neatness, just trying to get this to work for now) In my global.asax I

Wildcard in MapPageRoute

回眸只為那壹抹淺笑 提交于 2020-01-14 05:07:05
问题 I have a webforms-project where I use System.Web.Routing.RouteCollection.MapPageRoute to rewrite URLs but I have a problem with a few dynamic URLs. My URL could look like this; /folder/city-1-2-something.aspx and the MapPageRoute for this looks like this routeCollection.MapPageRoute("CompanyCity", "folder/city-{id}-{pid}-{title}.aspx", "~/mypage.aspx"); But I have realized that some URLs could look like this /folder/city-2-2-something-something.aspx /folder/city-2-2-something-something

Wildcard in MapPageRoute

此生再无相见时 提交于 2020-01-14 05:04:27
问题 I have a webforms-project where I use System.Web.Routing.RouteCollection.MapPageRoute to rewrite URLs but I have a problem with a few dynamic URLs. My URL could look like this; /folder/city-1-2-something.aspx and the MapPageRoute for this looks like this routeCollection.MapPageRoute("CompanyCity", "folder/city-{id}-{pid}-{title}.aspx", "~/mypage.aspx"); But I have realized that some URLs could look like this /folder/city-2-2-something-something.aspx /folder/city-2-2-something-something