asp.net

Substitution Control and Cache Location

If I use Substitution control in asp.net page, and also add the following directive to the page: <%@ OutputCache Duration="7200" VaryByParam="None" Location="Any" %> Would the location attribute be ignored, since using Substitution control on a page makes the page cacheable only on the server? ...

Oddity with ToString() custom number formatting

I am trying to convert numbers in the form 123456 to 123,456 which I find easy enough by using the .NET ToString() method with a custom format of N0. However in one case of data I am getting strange formats whilst using this method. In this case I am generating a DataTable dynamically for my input table to test the code. DataTable dt ...

How to authenticate users across domains using ASP.NET and iframes?

I am doing an ASP.NET website for a client, who wants to make their reports page available via IFRAME on other "reseller" websites. The reseller websites are providing the same service with different branding. I need to avoid, where I can, requiring them to implement any code on their webserver to enable this - hence using iframes. A us...

how to adjust "is a type but is used like a variable"?

i try to generate some codes in web service. But returing 2 error: 1) List is a type but is used like a variable 2) No overload for method 'Customer' takes '3 arguments' [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ToolboxItem(false)] public class wstest :...

How do I get a NameTable from an XDocument?

How do I get a NameTable from an XDocument? It doesn't seem to have the NameTable property that XmlDocument has. EDIT: Judging by the lack of an answer I'm guessing that I may be missing the point. I am doing XPath queries against an XDocument like this... document.XPathSelectElements("//xx:Name", namespaceManager); It works fine bu...

combobox column gridview

hello, I need to aske I have gridview with combobox template column and its fill with items . when select index changed i need to set description value in onther cell but I couldn't get the index of the gridview row? any help ...

How to Bind List<myclass> data with gridview?

Look please my web service codes return type List i get data from web service with listformat List; also created a gridview below and return list to gridview datasource.Bur eror occurs: A field or property with the name 'name' was not found on the selected data source. <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns...

"Action" column in a DataReader

I have an "action" column in my repeater which shows actions a user can select for an item. The column contains ASP.NET HyperLink or LinkButton controls. Some actions are based on whether a user is in a role, which I determine programatically. I'm struggling with the best way to dynamically generate this column when I populate the rep...

Remove a module from Sitefinity

How do I remove a module from Sitefinity? ...

ASP.NET Membership passwordStrengthRegularExpression and GeneratePassword

The generatePassword method in the asp.net membership provider allows only length and alphanumeric characters to be set. However there is also the property passwordStrengthRegularExpression Does GeneratePassword makes use of the property above. It would be great if it did but I assume it dosn't? ...

'overriding' javascript function

I need to add some validations before the user navigates away via an ASP.NET Menu. I noticed that the items are rendered to use a javascript function called Menu_Key <td id="ctl00_MainMenun1" onmouseover="Menu_HoverStatic(this)" onmouseout="Menu_Unhover(this)" onkeyup="Menu_Key(this)"> I there a way to override that function and have...

Passing multiple parameters of same column to SQL Server select SP

I have a string value in the web.config for example 2 guids separated by a ",". I need to query the database dynamically (i.e i have no idea how many values could be separated by a comma in the web.config) and run a select statement on the table passing these values and getting all that is relevant for example: select * from tablename...

ASP.NET: ajaxToolkit's HoverMenuExtender slows down sorting in GridView

I have a GridView inside UpdatePanel and also a HoverMenuExtender declared. GridView also has Paging and Sorting enabled and PageSize is 25. Right now I'm working on a mockup of the actual application so I'm using a mock DataSet with only 20 records. Problem is when I try to sort gridView by clicking on a column it's VERY SLOW. It take...

ASP.Net: Is it possible to skip databinding of an element if an error occurs?

Hey everyone, I use a lot of repeaters for different elements of our sites, and I've always wondered if there was a way to have the repeater skip an element if an exception occurs instead of having the whole page crash? In particular, I've inherited a system from another developer that using a similar design, however he didn't include ...

Accessing Page Class From Another Page Class

How do I access a page class from another class. For example I have: public partial class MyPage : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } } Why can I not access it from another class in App_Code folder? public class MyClass { public MyClass() {} public void DoSomething(object o) ...

BLL errors best practise

What is the best practise for returning an error of a business rule in a BLL? SHould I just raise exceptions and catch them in the presentation layer, shoudl I return some kind of object that holds any exception type info? ...

Binding a DataList to an object's method instead of a property

I have a class that looks like this: public class Person { public string Name { get; set; } public string Thing() { ... } ... } If I have an IList<Person> that I'm using as a data source for a DataList control, and the DataList looks like this: <asp:DataList runat="server" RepeatColumns="1" ID="Profiles"> <ItemTem...

Testing input fields not available for web service in Visual Web Developer Express

I have a web service that I am trying to test in Visual Web Developer Express Edition (Service Pack 1). I am working with two different websites on two different branches from an SVN repository but largely the same code. The web services are the same code but there are some code differences for other features. My problem is that when ...

asp.net localization: reporting on missing translations

Is is possible to hook into the localization engine somehow to produce a log of missing translations? We have a localized web app, but not all the keys have translations. In the case of a missing translation, the default (english, in this case) will show up for the user. It would be nice to be able to log these "failures". ...

User control events not getting to their handlers

I am trying to create a user control to wrap around the Membership API (A set of custom Gridviews to display the data better) and, while the code and the controls worked fine in the page, when I moved them to an .ascx, the events stopped firing to it. <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CustomMembership.ascx.cs"...