asp.net

How to set checked value for a radio input tag using ASP.Net?

I have this radio tag: <input name="phoneRadio" class="phoneRadio" id="rbDefaultPhone" type="radio" checked="<%# GetIsChecked(Eval("IsDefault")) %>"/> in a repeater and GetIsChecked is a c# function which return bool value, my problem that its not affecting the checked value of the radio button the right way, Any one know how t...

Moving Selected rows Between Gridviews

Hi all, I currently have Gridview1 which gets it's data from a database and displays a list of people.I also have a Gridview2 which is initially blank. I would like to add the functionality of adding/removing rows to gridview2 from gridview1. I've added a checkbox column to gridview1 to allow users to select the records they'd like to ...

Taking a NULL value from the database and assigning to a Date variable

A stored procedure returns data about a user record including a nullable datetime column for their last login date. Which one is the better choice in dealing with the possibility for NULL values when trying to assign a .Net date variable? Try _LastLogin = CDate(DT.Rows(0)("LastLogin")) Catch ex As InvalidCastException ...

Error while accessing ASP.net webservice using JQuery - JSONP.

Please look at the code below and help me to figure out what am I doing wrong in my web service code. I want to set up an asp.net web service that can be consumed using an JSONP. I am using Jquery at client side to access the site. Even after setting up proper attributes my web service still emits xml due to which the aynch call fails. ...

Any issues converting ASP.NET applications from 1.1 Framework to 2.0?

We are migrating many ASP.NET 1.1 web applications to new servers. We would like to convert all of them to 2.0 in the process. Ideally, in the end, the 1.1 framework will not even be installed on the new servers. We've never had major issues converting applications to 2.0 from 1.1. Our biggest issue has always been changing Configuration...

Dropdownlists and jQuery

The ASP.NET DropDownList has the property Enabled="false", but is it possible from jQuery to set the property to Enabled="true"? ...

Is there a good library in .NET for Parsing/Displaying ICS feeds?

I'd like to embed a google calendar in my website, but I hate the options their built in stuff gives me for colors, etc. Has anyone put together a good library for doing this stuff. I am specifically running on a DotNetNuke site, but any embeddable js code, or .NET library for doing this would be a great answer. ...

How to scroll to an element inside a div?

I have a scrolled div and I want to have a link when I click on it it will force this div to scroll to view an element inside. I wrote its javascript like this: document.getElementById(chr).scrollIntoView(true); but this scrolls all the page while scrolling the div itsself. How to fix that? I want to say it like that MyContainerDiv...

How to read all shared google reader feeds by code?

I share a lot of feeds on my google reader, i want some code using asp.net to read all these feeds and put in a page, may be with paging because feeds are too much. Any one know how to do so?, or if there is a tool for that ...

ASP DropDownList UpdatePanel IE JS Errors

I'm getting a peculiar javascript error with IE. I have an updatepanel, and inside it a drop down list. When I change the dropdownlist's value, it gives me error "Line: 5 '__EVENTTARGET' is null or not an object'. I took a look, and this Line 5 and __EVENTTARGET are in the ASP.NET generated javascript code. I want a dropdownlist that fi...

How can I handle fractional quantities in an e-store shopping cart?

I am building an e-store and I need to have the ability to add fractional quantities to the shopping cart. Admin would set a denominator per product (e.g. 8 would mean that the minimum purchase is 1/8 of a case) I currently use a jQuery slider and display the quantity in the asp:Label which works just fine on product pages, however it...

Windows authentication. User gets prompted - ASP.NET

I have the following settings: Web.config Authentication Mode = "Windows" Virtual Directory -> Enable anonymous access - UNCHECKED -> Integrated Windows authentication - CHECKED When a user goes to the default page on the intranet, he gets prompted to enter the user name and password even though he has already been authenticated **U...

ASP.NET DataGrid control disable - why doesn't this code work?

I have a DataGrid in ASP.NET 2.0 with the following column in it: <ASP:TEMPLATECOLUMN> <ItemStyle HorizontalAlign="Right"></ItemStyle> <ItemTemplate> <asp:HyperLink id="HyperLink1" runat="server" CssClass="DataGridCommand" Target="_blank" NavigateUrl='<%# GetPreviewURL(DataBinder.Eval(Containe...

How do I create a detailed error page?

I want to create a custom error page to handle all unhandled exceptions. I want to redirect to it from the Application_Error(object sender, EventArgs e) method located in Global.asax.cs. How can I show in it some detailed information from the exception which throws the application error? ...

Inputs empty on post-back despite having values.

I'm using a telerik RadGrid, with a UserControl edit form. When the InsertCommand event fires, I get the user control, and find edit controls on it, but there Text properties are all string.Empty. I suspect this has something to do with ViewState, but I don't know where to begin looking. protected void jobGrid_InsertCommand(object sou...

What's a good strategy for renewing the expiration of a forms auth ticket between .net and php?

I'm creating an application that will get the contents of a cookie storing a forms authentication ticket from .net. That part is done. In that ticket is an expiration time, by default 20 minutes. So the scenario is, a user logs in and is validated on the .net side. Then they are redirected to my PHP app. I get the username, ticket expi...

How to use Generic Handlers (ASHX) in ASP.NET MVC?

I need a image generator in my ASP.NET MVC application, but I don't know if it is possible to use ASHX in ASP.NET MVC. If there is an class similar to IHttpHandler that inherits IViewDataContainer, then I could use ViewData.Model on my ASHX. I read a blog post about it but it seem outdated from the info I got in the ASP.NET forum Any ...

Best way to register different types of users asp.net mvc

I am looking to register 2 styles of user, they will both have different sets of data in the database. I am looking to use asp.nets membership roles. Are there any simple ways to do this in an mvc app using maybe the account controller? ...

jQuery AlphaNumericPlugin - Copy Paste Issue

I am using the .alphanumeric plugin for jQuery which is certainly doing what I would expect as users type directly into the textbox. But, if a user were to copy and paste a value into the text box, all bets are off. $("#<%= txtNumber.ClientID %>").alphanumeric({allow:"-"}); I can certainly do this: $(document).ready(function() { ...

Explicitly handle or create the data object that’s bound to the control

hi, I read somewhere that one of few weaknesses in data binding model is that you never explicitly handle or create the data object that’s bound to the control and as a result you don’t have a chance to add an extra item. But I’m not sure what is meant by that. What or how exactly would you be able to add an extra item if you were allo...