asp.net

Why can't I cast e.CommandArgument as a Guid?

The following code fails at runtime Dim Id As Guid = CType(e.CommandArgument, Guid) It throws this exception System.InvalidCastException was unhandled by user code Specified cast is not valid Why can't I cast e.CommandArgument as a Guid? ...

ASP.Net free Ajax file upload control

I need an ASP.NET control for file uploads that can work in an update panel. Any ideas? ...

What is a good (cheap/free) calendar/schedule control for asp.net?

I need a calendar/scheduler control for asp.net - not a pop-up date picker, but a full page monthly calendar. I'm trying to create an on call rotation / scheduler utility for work, and it'd be great to display the who's on call info in a calendar on a web page where others could quickly see who's on call. using visual studio 2008/asp/n...

How do I dynamically create/remove controls, with EventHandlers, to/from an ASP.NET page?

In one of my projects I need to build an ASP.NET page and some of the controls need to be created dynamically. These controls are added to the page by the code-behind class and they have some event-handlers added to them. Upon the PostBacks these event-handlers have a lot to do with what controls are then shown on the page. To cut the st...

Minify Html output of ASP.NET Application

What are the ways by which we can reduce the size of the HTML Response sent by an asp.net application? I am using Controls which are not owned by me and it produces output with white spaces. I am interested in Minifying the entire HTML output of the page just like how google does (View source www.google.com) to improve the timing. Is t...

Why doesn't jquery turn my array into a json string before sending to asp.net web method?

So far, I've only been passing javascript strings to my web methods, which get parsed, usually as Guids. but now i have a method that accepts an IList... on the client, i build this array of objects and then attempt to pass it like: $.ajax({ type: 'POST', url: 'personalization.aspx/SetPersonalization', data: "{'backerEntries':" +...

Validating an ASP.NET user control from its parent page

I have an asp.net page with a button. This button generates and inserts a user control into the page, so many controls could exist on one page. I need to validate that a certain dynamically generated control inside the generated control exists. So..Page has 0 to N Control1’s. Each Control 1 can have 0 to N Control2’s. When SaveButt...

Who knows a good free open source forum in C#?

For a project I need an open-source free simple forum in C# and ASP.NET (ASP.NET MVC is preferred!). Does anybody know any? ...

Error in getting a custom object inherited from a base class using web method ASP.NET

Hi I have created a base class A and a class B is a derived class inherited from class A. Both classes are marked as Serialized. When I try to return an object of type B through a web method i am getting following error: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to proce...

How can I set up a timed interval in javascript?

The following javascript should setup an interval so a new item from the list of json objects will be added to the top of the list slowly, but instead they are all added at the same time. <script type="text/javascript"> var json; var count = 0; $(document).ready(function() { $.ajax({ type: "POST", url: "/Home/PublicTimeLine",...

Keeping data in session vs. populate on postback

What is preferable, keeping a dataset in session or filling the dataset on each postback? ...

Advice on which modal popup to use: ASP.NET AjaxControlToolkit vs jQuery plugin vs Greybox vs ?

This is all being done in an ASP.NET web forms application: I need a modal popup that will show the user a preview of images that match a search criteria (e.g. they search for "dog" and the popup shows them all dog-related pictures). The search results shouldn't be too long, but the popup should support the ability to scroll if necessa...

How to read text from a textbox and make some of them a link?

I will show the problem with a example. There is some text in the textbox such here: Hi! this is a example [lnk]text[/lnk] When i push the submit button and publish this text, the word in the [lnk] and [/lnk] tags must be a link like this www.mysite.com?link=text. How do I make it easily with javascript or jquery? Note: I'm not so ...

jQuery $(document).ready and UpdatePanels?

I'm using jQuery to wire up some mouseover effects on elements that are inside an UpdatePanel. The events are bound in $(document).ready . For example: $(function() { $('div._Foo').bind("mouseover", function(e) { // Do something exciting }); }); Of course, this works fine the first time the page is loaded, but when t...

Multi-lingual web application - how do I detect the user's language in ASP.NET?

I'm building an ASP.NET web application, and all of my strings are stored in a resource file. I'd like to add a second language to my application, and ideally, I'd like to auto-detect the user's browser language (or windows language) and default to that, instead of making them choose something besides English. Currently, I'm handling all...

ASP.NET Image uploading from URL

I have an aspx page,where the user will enter a valid image url(ex : http://stackoverflow.com/Content/Img/stackoverflow-logo-250.png). I need the program to upload this image to the Server. How can i do this ? ...

Constantly repeating timer in an asp.net ajax page

Today I had my first test with the ASP.NET AJAX Timer Control, in hope that it would allow me to constantly keep updating my site. At the moment, it just updates once; this does not match the behavior of the previous .NET timers. Was the AJAX Timer control only made to update an item once? Or do I need to use another framework? ...

Calling Webservices in a loop won't execute the custom OnSuccess function

Hi there, I have a problem. I am coding using VS2008. I am calling webservices from my Javascript Page. An example Services.ChangeDropDownLists.GetNowPlayingMoviesByLocationSVC( blah, OnSuccessMoviesByRegion, OnError, OnTimeOut ); after execution it goes to the function OnSucc...

Why is the WebService not working?

function AddTheatres() { Services.AdminWebServices.AddTheatresSVC(oTheatres,OnSuccessTheatres,OnError,OnTimeOut); } function OnSuccessTheatres(result1) { Services.AdminWebServices.AddTicketPricesSVC(oTicketPrices,OnSuccessTicketPrices,OnError,OnTimeOut); //working } function OnSuccessTicketPrices(result2) { alert(result2); //...

Is there a resource to help convert Prototype JavaScript to jQuery?

I have extensively used Prototype before and it helped us add considerable interactivity to our web applications. However we are looking at making the move to use jQuery in order to standardize on something better supported in Visual Studio. I understand that we can use the jQuery.noConflict to run it alongside Prototype, but we would l...