asp.net

page load taking much time asp.net

Hi everybody, I have a user control that fetches data from a database. It takes a lot of time. Also the speed of my web application has become slow. What should I do to make page loading faster? ...

ASP.Net MVC help with refactoring

I'm quite new to both ASP.Net and MVC. I got the following code in my master page: <div id="main-menu" class="menu"> <% var items = (IList<CompanyName.Framework.Web.MenuItem>)ViewData["MainMenu"]; if (items.Count > 0) { %><ul><% foreach (var item in items) { if (!string.IsNullOrEmpty(item.RequiredRole) && ...

Increment in AJAX MultiHandleSliderExtender is not incrementing properly

I am creating an interface which allows the user to select different time ranges from a time line indicating hours from 0 to 24. Therefore i have created a ajax MultiHandleExtender and assign different properties to it as shown below: <form id="form1" runat="server"> <div> <asp:ToolkitScriptManager ID="toolkitScriptManager" runat="s...

ASP.NET WebApp Updatable on the fly

Hi all i have currently got an asp.net website that has had all its code behind files taken out and a separate assembly is used to hold the functionality. This was done as we have a team of designers who continually add new controls and scripts and styles to the site. As a website is not pre-compiled this is not a problem. the trouble i...

Why does streaming an image not work in modaldialog

I'm adding some functionality to an existing 'popup' in an ASP.NET website. The popup is called by window.showmodaldialog because the website only needs IE support and well, ... it was just programmed that way many years ago. Now when I try to stream an image ( show a save file dialog ), this code does not work. It does work on normal p...

Requests against elmah.axd always fails with a 500 - Internal server error. Why? :-(

I used the NuPack tool to add Elmah to a site on my developer machine. This worked like a charm, but when I send a request to the elmah.axd page all I get in return is 500 - Internal server error. My code setup: Visual Studio 2010 Site built on top of EPiServer 4.62B Running on .NET Framework 2 (because of EPiServer) My IIS setup: IIS ...

How do I determine which css media type is being requested on my page?

Hi, I'm looking to alter the way my asp .net webpage is output to the browser depending on the css media type being used. Although the css is generally taking care of the differences in appearance between screen and print mode I would also like to make some minor adjustments to the markup when print mode is required. I would simply be...

Filter expression not working correctly

Hi, I am using a GridView and I require the user to be able to filter using 2 controls. One simply filters the type of row - there is a column called action, and the user selects one of the distinct values from the database in a dropdown box, and the gridview only displays the rows with that value in the action column. On it's own this w...

Please show me a PHP (or ASP.NET) code to delete an image file within 10 minutes of it been ACCESSED.

Dear Sir/Madam Please show me a PHP (or ASP.NET) code to delete an image file within 10 minutes of it been ACCESSED. The code should automatically run every 5 minutes to check a directory called IMAGES. Thank you very much. Your Sincerely Blue Flower ...

Can a user control come with its own CSS styles embedded in the user control?

Can you put CSS style block (ie <style type="text/css">...</style>) on an ascx page, in order to style the user control? I tried it and it works. However I wonder if this is a common practice and the problem is the style block is inserted into the final HTML right where the user control is supposed to be. My understanding is style blocks...

Exception on Membership.GetAllUsers() after login: "Item has already been added"

Hi I have two sites running which share a membership provider. One of them is a ASP Playground site and the other is a site that have the ASP Playground Site Integration Package installed. Let's call them ASPPG site and SIP site. I sometimes get an error when I run Membership.GetAllUsers() on the SIP site. This method is overruled by t...

Best way for two apps on the same machine to communicate

I have an ASP.NET app running on a webserver. A third party is created another app in PHP which needs to send data to my app for processing. Initially it was assumed that the PHP app would be deployed elsewhere so we agreed that the communication would occur over the internet via HTTP (over SSL). My app would simply use a generic handle...

Show hyperlink and popup window when Mouseover on image in Ajax Enable Page ?

Hello, I am using this solution for "Show hyperlink and popup window when Mouseover on image". Its working nicely but Its not working when Ajax is Enable on page. How can I do this workable in Ajax enable page? ...

ASP.NET, Open new window on postback

Requirements: We have a form for users to submit. On submission, form data is used for calculations and generation of reports. On postback, a confirmation message and further options are displayed. We want to display report in a new window/tab. Conditions: We do not want to use JavaScript on postback to open a new window onload as this ...

How do you access one repeater's control into another repeater's OnItemCommand() method ?

lets say I want to make a label of repeater1 visible in repater2's ItemCommand() method.. e.Item.FindControl("rpt1Label").Visible=True; is not working..how else do you do it ? [EDIT] changed that to repeater1.FindControl("rpt1Label").Visible=True; This is throwing object reference null exception ...

What is the difference between Rest Web Service & rest enabled wcf service?

I have developed an rest enable wcf service by using the following link http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/simplerestservice11172009221218PM/simplerestservice.aspx Now I want to know is there any difference between rest enabled wcf service (or restful web service) & rest web service ? If there is any difference then...

I want to disable hyper link after clicking on it

I have a link <asp:HyperLink ID="BtnPrint" runat="server" NavigateUrl="~/CrystalReportViewer.aspx" Visible="false" Target="_blank" ToolTip="Print pdf">Print</asp:HyperLink> I want that when I click to show it should be visible.. that's working... but I want that when I click to this hyper link it ...

Ways to detect changed account/no account found in ASP.NET/C#

I have an ASP.NET page where at the top of the page is a search box. There are 2 text boxes - one is an autocomplete extender for the Name on a database, and one is just inputting the ID. The page features DetailsViews and GridViews primarily, and even when no account has been searched for, these display blank data which is not ideal. I...

ASP.NET PageMethods - Back Button Causing 'Authentication Required' Prompt

Since last week I've had a really odd issue with PageMethods and the back button which i've never seen before. Essentially, I have a 'home page' which on document.ready (using jQuery), loads some data through PageMethods, and then renders a list - from which you can click through to a details page about the item. In general use, it wor...

Execute query in .net

Hi all.. I am trying to insert multiple tables at a time.. If any one of the insert is failed that means 0 rows updated after that.. When i try to execute the command in .net using execute non query i got 0 as result .. Is there any alternative ways to fix this . I need to execute the query and return 1 as the result ie,. succe...