asp.net

RadGrid Per Page Sorting

I'm tying to make a radgrid that sorts items like a bank statement. By this I mean it has to follow a specific pattern. All the data is pulled in one linq statement and put into what is essentially a list. Each page must have an ascending sort (by date dd-mm-yy) from top to bottom. This means we should see : 26/09/10 | item 1 | €9...

HTTP Module and Cookies in Sharepoint 2007

I have some proof concept code for a HTTP module. The code checks to see if a cookie exists, if so it retrieves a value, if the cookie does not exist it creates it and sets the value. Once this is done I write to the screen to see what action has been taken (all nice and simple). So on the first request the cookie is created; subsequent...

asp.net mvc a href id

$('a').click(function () { var href = this.href; //alert('I was clicked, here my href = ' + $(this).attr('href')); var divid = $(this).attr('href'); $("#" + divid).slideToggle('slow'); // show hide div $("#" + divid + "1").slideToggle('slow'); // show hide div ...

How to catch event data on click event in fullcalender using asp.net mvc

I am using fullCalendar and I'm able to populate the calendar with events very easily. And I undertsand the best way to add events to the calendar is through the database. What I need now is to catch and populate an edit event form after the user clicks an event. How would I do this when I am using asp.net mvc 2? ...

ASP.NET GridView Paging with IQueryable

I'm currently using IPagedList to efficiently page my data. When using with a GridView I can set the page index in the GridView.PageIndexChanging event and rebind the grid. The problem is, the GridView.PageCount property is readonly so the default pager only displays 1 page. I suppose I'm going to have to roll my own GridView implemen...

Obtain image width and height without loading image in .NET?

Like the Title, is this possible? I only need the width and height, so loading the image into ram would be unnecessary. ...

Losing the value of a FileUpload textbox when a dropdown list selection changes..

I am having an dropdownlistbox and fileupload control.After selecting a file from upload control,if i change the dropdownlist value(postback occurs) then the file path i choosen earlier is shown empty. here is my code: <asp:Label ID="lblupload" runat="server" Text="Upload a file: "></asp:Label> <asp:FileUpload ID="upl...

Friend request using facebook api inasp.net

IN my web application any client is login with facebook api then how to send friend request to the admin automatically. ...

Site map in a horizontal block

How to create a site-map like: I have tried using asp.net menu control and treeview cotrol and changing their various properties. But I failed to align like this I mean in horizontal block as shown.I have not found any properties to the same as I mentioned.Can any one help me how do this. ...

asp.net avoid navigation on enter key

How can i avoid navigation when a user presses the enter key on an asp.net page ? Seems that they get redirected to the first page in the directory structure "Account\AccountRcovery" I don't actually have any code to redirect to that page. Also can this be disabled for the entire site ? as i have quite a few pages that would require mo...

How to integrate sharepoint document into web application and adding credentials for external users

Hi, Being new to integrating sharepoint documents into web applications I am struggling with the following task, so any help or guidance would be very much appreciated. I have a page in my web application that needs to display a document from sharepoint. I use the appropiate sharepoint web service to get a list of all the documents in...

custom User control in ASCX

I am implementing a user control in ASCX similar to which is shown in the link below http://easylistbox.com/demoMultiDropDown.aspx I could achieve everything except when I click on the dropdown and click on outside the list is not disappearing again. Please help me on this. ...

Finding html element onPreRender state of User Control

Hi all, I have a user control which has html elements like <input type="button".... and i want to set its display property on preRender state. Would you please explain, what kind things i have to handle this user control? So, in this function protected override void OnPreRender(EventArgs e) { } I have only EventArgs e and it doesn't ha...

MVC2 model validation mutually exclusive required annotation

Does anybody know of a good algorithm to mutually exclusively check two properties using a ModelValidator? Something like: [EitherPropertyRequired("BuildingNumber","BuildingName"] public class Address{ public int BuildingNumber { get; set; } public string BuildingName { get; set; } } ...

do postback then re-direct to a page

I'm trying to do a javascript postback and then re-direct to a different page but it keeps posting back to the current page Here's my code $(this).prepend('<a class="booknow2 sidelink sidelinkNew" href="javascript:__doPostBack(\'SetSess\',\'\')"><img src="../../images1/button/leftEdge.png" width="4" height="35" style="float:left; margi...

Procedure or function "" expects parameter '', which was not supplied

Hello, I have a problem with Database thing. The stored Proc has to be called with either 3 or 4 parameters. If ImageID is not given, then it has to get into If loop and execute. if ImageID is given, execute the else part of the stored proc. But i have no idea why is that showing Procedure or function "" expects parameter '@ImageID', ...

eTag and many versions of page

I have an ASP .NET site with a custom server-side caching system which is a nightmare. I want to use eTags to replace this. Many of the links in the site return different versions of a page depending on session state for the user. An example - mypage.aspx?p=a will return different versions of mypage - equally valid, depending on session...

accessing gridview hiddenfield

Hi I have a gridview: <asp:GridView ID="gridData" runat="server" AutoGenerateColumns="false" CellPadding="3" AllowSorting="true" CssClass="CartContentTable" GridLines="horizontal" Width="100%" OnDataBound="addLabelsWhereNeeded"> <ItemTemplate> <asp:HiddenField ID="hdField" runat="server" Value='<%# Eval("CartItemGuid")%>' ...

Can a FormsAuthenticationTicket survive an app pool recycle?

I am looking for a solution where we can make a FormsAuthenticationTicket (and corresponding cookie) with a very long expiration period. This is possible by setting a high value or using a sliding expiration, but when the application pool of the website is recycled, the FormsAuthenticationTicket disappears (I think), the cookie gets inva...

Route IIS request to parent folder resource

I would like to create an asp.net page in my site within a particular folder e.g. at www.xyz.com/go/mypage.aspx. I would then like any requests that are routed to sub-folders of /go to actually route the request to this page. i.e. a request to www.xyz.com/go/test/123 should actually end up being handled by /go/mypage.aspx. (Indeed, it ...