asp.net

ListBox elements rearranged with JavaScript causing event validation error on postback

I have created an item swapper control consisting in two listboxes and some buttons that allow me to swap items between the two lists. The swapping is done using javascript. I also move items up and down in the list. Basically when I move the items to the list box on the right I store the datakeys of the elements (GUIDs) in a hiddenfiel...

sort columns of gridview in asp.net c#

Can anyone tell the function to sort the columns of a gridview in c# asp.net. The databound to gridview is from datacontext created using linq. I wanted to click the header of the column to sort the data. Thanks! ...

How do I turn on Option Strict / Infer in a VB.NET aspx page without a code behind file?

Umm, I guess my questions in the title: How do I turn on Option Strict / Infer in a VB.NET aspx page without a code behind file? <%@ Page Language="VB" %> <script runat="server"> Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) End Sub </script> ...

.NET AJAX 1.0 Aysc Callback Modifies Form Action When Server.Transfer is Used

I have a web form that I am attempting to implement dynamic drop down lists on using the .NET AJAX 1.0 extensions. I have successfully implemented the needed bits, but have an interesting quirk. When I select a value from my first drop down list, my call back happens and my page is updated correctly. The next value I select, I receive t...

Programmatically Adding User Controls Inside An UpdatePanel

I'm having trouble dynamically adding controls inside an update panel with partial postbacks. I've read many articles on dynamic controls and I understand how to add and maintain them with postbacks but most of that information doesn't apply and won't work for partial postbacks. I can't find any useful information about adding and mainta...

What is the maximum length allowed for window.returnValue property? (JavaScript)

Is there a maximum length when using window.returnValue (variant) in a modal? I am calling a modal window using showModalDialog() and returning a comma delimited string. After selecting a group of users, I am putting them into a stringbuilder to display in a literal. Dim strReturn As New StringBuilder strReturn.Append("<script type=...

Separating client side logic from server side logic in a reusable way using MVC

Before you answer, this question is complicated: We are developing in asp.net / asp.net mvc / jQuery but I'm open to solutions on any platform using any framework I think logic like sorting / hiding columns / re-arranging columns / validation (where it makes sense) should be on the client-side I think logic like searching / updating th...

Is it possible to pass a App setting in the web.config to a Common C# class

Is it possible to pass a App setting "string" in the web.config to a Common C# class? ...

Decrypting the YSOD, techniques to the mayhem.

How many can relate do this? hehe On a more serious note, what are the first things you look for when you see the yellow screen of death? Half the time the debug trace isn't actually telling you what the problem is (understandable I guess). What techniques do you use to debug the problem? I must admit, I still use response.write mo...

In my codebehind class, how do I retrieve the authorized roles?

I have the following in my web.config: <location path="RestrictedPage.aspx"> <system.web> <authorization> <allow roles="Group1Admin, Group3Admin, Group7Admin"/> <deny users="*"/> </authorization> </system.web> </location> Within RestrictedPage.aspx.cs, how do I retrieve the allowed roles collection that c...

What is the best way to store a reference to an AD group?

I'm writing an intranet application for a client and I want to give them the ability to configure through an admin interface, which users and user groups can access certain areas. What I'd like to know is the best way of storing the reference to the user or group that is assigned to an area of the intranet. Should I be using the domain...

RadioButtonList exception

After I upgraded to the beta, I'm having trouble with Html.RadioButtonList. Can someone show me what I'm doing wrong? The code: <% Html.RadioButtonList( "voter" + voter.Id, new SelectList(new[]{"yes","no","abstain"}, "yes")).Each(x => Response.Write(x)); %> And the exception I get: [ArgumentNullException: Value cannot be nu...

What is the best method for storing viewstate in an ASP.Net mobile web application?

I'm curious what techniques you find to be the best for storage and maintaining of viewstate with respect to an ASP.Net application running within a mobile web browser (i.e. Treo with Windows Mobile, or Blackberry Curve web browser). ...

Whats the best way to programatically add a .swf to an asp.net page?

Is there a good way to add a .swf programatically to a panel on an asp.net page - ie: I know i could just insert the html tags: ie: <object type="application/x-shockwave-flash" data="yourflash.swf" width="" height=""> <param name="movie" value="yourflash.swf"> </object> But is there an existing .net or free FLASH component already t...

How to get a web development gig when my ASP.NET experience is a year and a half old?

How to get a web development gig when for the past year and a half have been working on C# libraries and user control. I have lost a bit of touch with ASP.Net 2.0 and have been familair with the older version of ASP.NET. Employers see this lack of web development in the past year as a big red 'NO' sign. I have been writing assemblies fo...

Dynamically bind data to dropdownlist in asp.net mvc

Hi, How to dynamically bind data to <%Html.Dropdownlist.... in asp.net MVC? Regards, Ambika ...

ViewState error points in site.master

Hi, I just added asp.net calendar control in new page under sample folder in asp.net mvc beta application. when i execute the particaular page that i need and it shows the error following Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validation...

How can I reference a JavaScript file on every page? (ASP.NET 1.1)

I have an old ASP.NET 1.1 site that I am maintaining. We are working with Google to place analytics code on all pages. Since I can't take advantage of master pages in 1.1, I have my pages include headers/footers/sidebars with User Controls. What came to mind first is to place the JavaScript in my footer ascx control so it appears on e...

Path '/forum/default.asp' is forbidden

I have an ASP.NET 2.0 web app and part of the structure still has some legacy ASP under the folder /forum/. I haven recently moved my dev environment to a new machine and am now getting: Path '/forum/default.asp' is forbidden when trying to open a page with a .asp extension under the Cassini environment. Any ideas what could be causing...

ASP.NET Membership for high security scenarios?

Hi there, Is the asp.net membership system used over wcf (transport security turned on) enough for high security internet scenarios with thousands of clients spread all over the internet? I'm just evaluating possible solutions and wanted to know if this might fit in this category. If not, what would be the best method to provide high ...