asp.net

jqGrid, ASP.NET, JSON is Driving me crazy. Please Help.

Hi there - I've been trying to get this to work for days upon days and it seems like one thing after another. Initially, I finally tracked it down to trouble passing ASP.NET dates in the JSON string back to the grid. I am now using JSON.NET and the dates are coming back the way they should be I'm stuck right back where I alwasy seem to b...

Does IIS or ASP.NET do any sort of connection throttling?

Hello, I am trying to create an ASP.NET Web Service which I can use to show the difference between implementing a Web Method asynchronously vs. synchronously. It is sort of a proof-of-concept that I can use to show how writing things asynchronously can make an app more scalable. To make the comparison, I implemented two methods, RunSq...

Executing Methods with ItemTemplate Parameters in ASP.NET

I need to execute a method within an ItemTemplate in my DataList. How do I format the method in the page to work correctly with an Eval? The method takes an int as a parameter. <%# NumberOfEmplyeeOrders(Int32.Parse("EmployeeID"))%> ...

How do I get a list of roles for the currently logged in user.

I want to know what roles a logged in user belongs to without having to check the user against all possible roles (i.e. using Page.User.IsInRole()) ...

window.open not working when attached on onload event in chrome and safari

I have attached some javascript on onload event of the form. this script contains window.open. Although this works fine in all the browsers window.open doesn't open a new window nor it gives nay error message in google chrome and firefox. I want to first check the screen resolution if it is less than 1024 then I would open it in a new w...

XML Parsing Error: no element found

I am using NiceEdit to format text in text areas, it displays a toolbar over the specified text area, I created a test page, its working, I Response.Write the content of the text area after being formatted, and its okay, I created a break point to see whats being read, it was all fine. Now I moved to the real page where I should impleme...

How to pass multiple parameters in a querystring

I have three values which I have to pass as parameters for e.g., strID, strName and strDate. I want to redirect these three parameters to another page in Response.Redirect().Can anybody provide me with the correct querystring? ...

Telerik equivalent for DetailView

Is there a telerik equivalent for asp.net DetailView. Or can i customize a detailview to include telerik controls for editing (with minimum effort) ...

ASP.NET Dynamic UserControl ID generation problem

I'm having a problem with the ID property of dynamically loaded UserControls changing during the Page lifecycle. More specifically the ID property changes when the system calls Page.Form.RenderControl(htmlTextWriter); Before it is called the control has ID "ctl84", but after the call it has ID "ctl99". The output from htmlTextWriter con...

Error when setting the datasource for a gridview

I have a gridview. Its datasource is set as follows. dtTable is a datable in which the values for the table will be retrieved. But when setting dtTable as datasource I get an error "Object reference not set to an instance of an object". What may be the reason for this? gridview.Datasource = dtTable gridview.Databind() ...

Multiple localized aspx layouts

I want to localize an application, and currently use the App_LocalResource resx files for language changes. However, I want to change the layout of the controls on an ASPX page dependant on locale. I know it is possible to set visible from the resx file. For example; my default (en-US) could have "firstname" : [textbox] "surname" ...

Plugins, Interfaces or something else for customer specific exports

I'm writing a web application that needs to export data out of it. The problem is that every client requires a different format. Some want tab delimited, some comma seperated and even fixed width. Different data may also be needed by each export. What approaches should i consider to make it so that each client can have their own forma...

How to only display certain images in a folder into a Repeater in ASP.NET

I have a Repeater that takes all my images in a folder and display it. But what code changes must i make to only allow lets say Image1.jpg and Image2.jpg to be displayed in my repeater. I dont want the repeater to display ALL the images in my folder. My Repeater <asp:Repeater ID="repImages" runat="server" OnItemDataBound="repImages_Ite...

paging count error asp.net

I have a data list with paging which works fine locally debugging but doesn't work on my deployment server provided by my hosting company. Line 151: TotalRowCount = pagedData.DataSourceCount; I'm using the same remote database for both local and on deployment server. Error message: Server Error in '/' Application. Object refe...

Export to .xlsx

Hi all, Could anyone suggest best way to export data to .xlsx format. 1.Dynamically creating sheets. 2.customizing the data in each sheet. We can't use office web components. Thanks ...

very simple caching - is this an o.k. technique?

I am using the following technique to cache some calls to my database - this function lives in my repository. Public Shared Function GetByStoreURL(ByVal StoreURL As String) As Model.Partner Dim key As String = StoreURL If Current.Cache(key) Is Nothing Then Dim objPartner = Model.DB.Select().From(Tables.Partn...

Bulletproof Sessions for IIS Web Farm

Good afternoon, all. We're currently making the jump from one web server to two and in order to provide seamless failover to our users we need to do something about the session. Currently, we're investigating three different methods. Make use of a state server Make use of SQL server Chuck everything into hidden fields I, personally...

Communication between web applications, 1 SSL certificate, other has none

This the situation: I have one webservice without SSL, which provides two pages for the other web application. When the user submits these pages, an XML file with private information is sent to the webservice. How can I provide the necessary privacy protection on the XML file? Is the one certificate good enough to give the appropriate s...

How to control page post from javascript?

Here's what I want to do. I want the users to be able to delete their own posts but I want them to confirm this first, so when the user clicks the Delete link, I want to display a confirmation dialog with Yes and No (the standard Javascript confirmation dialog), if the user chooses 'No' nothing happens and the page won't post back but if...

ASP.net Server controls: How to handle ID of dynamic controls

Hi, I have the following problem (I'll explain it simplified because otherwise it would get too complicated/long). I need to create an ASP.net server control that is inherited from Panel. Simple enough. When the custom control renders, it should dynamically create a Button, associate an event handler to it (which will also be defined i...