Hello,
I have a problem that is really making me feel dumb. I have a custom control that inherits textbox. This textbox (at least for this example) simply has a .js file that is embedded in the .dll.
Long story short, works great when not in an AJAX update panel. So i did some research and found that instead of using: Page.ClientSc...
I want to run a query to get a string array of distinct "logName" items for a logType. The following works great:
Dim stringArray() As String = (From item In dc.Vw_Logs
Where item.LogType = [Passed in logType]
Select item.LogName Distinct).ToArray()
However, this only works when a specific LogType is set. I would like the ...
So basicaly I am working on a site that is attempting to be optimized for phones (This includes pretty much any browser enabled phone) Due to the nature of the site, I want it to load as quickly as possible. At this point, I think the page is around 30k or so in size.
Now I am using viewstate, mostly for things like datagrids and not ...
Hi, I have a Web Reference to a remote Web Service, which is called in several different classes. I'd like to catch all exceptions coming from this Web Service only.
How can I do that (for example extending it's base, auto generated class) without interfering and modifying all upper level code?
...
EDIT: Duplicate of Should Entity Framework Context be Put into Using Statement?
I've been tossing around this idea for some time wondering what bad could happen by not properly disposing my object context and allowing it to die with the GC. Normally, I would shun this, but there is a valid reason to do it.
We are using partial clas...
I was in need of the ability to create a PDF Envelope, and hadn't found a good solution for doing so, so I thought that this might be of some interest.
...
How can I disallow anonymous access to my ASP.NET mvc controllers? Specifically,
I want to require authenticated access to all controllers but allow anonymous access
to resource type files such as .css and .js files. Don't plan on using membership services as I am using Microsoft Geneva.
thanks!
...
One solution would be to add a QueryString variable to the url that is a random guid, but that seems a little messy. Is there a setting somewhere that will prevent the browser from displaying a cached version of a page?
...
Hello,
I have a user on what we will call PageA.aspx. This user needs to get to PageB.aspx. The obvious way is have a hyperlink that simply sends them to PageB.aspx. That got me thinking about the other ways to get between pages. One could use javascript to do a client side jump. There is also the seemingly bulky server side redire...
I'm migrating a huge web application from SQL Server to MySql. The application uses Linq so i'm using DBLinq. Currently most things are working properly except for that on a few pages i get a strange error. It all started with this:
Property 'Int32 ForumID' is not defined for type 'DbLinq.Data.Linq.Table`1[CPost]'
I've obviously got ...
Hi,
I am adding a LinkButton control dynamically into a PlaceHolder. If I add a new instance of the LinkButton on every OnInit(), then OnClick handler for this LinkButton works.
However, if I store the instance of LinkButton in the session and then add it into collection of controls of the PlaceHolder, LinkButton.OnClick fails to fire....
I still find myself hand coding Visual Studio projects more than using the variety of UI-driven menus and dialogs. For example:
web projects: hand code html/css in Source View vs dealing with the Design View / Properties Window
flushing out class files: code by hand using stuff like the prop-TAB-TAB Create Property keyboard shortcut a...
Hi all,
I was wondering if anyone can point me in the right direction.
I have an asp.net button with an click event (that runs some server side code).
What i'd like to do is call this event via ajax and jquery.
Is there any way to do this? If so, i would love some examples.
Thanks in advance
...
I am having trouble with forms authentication. The root web.config is setup to deny access to all non authenticated users with a structure like:
Controllers
Folder - Webforms
Folder1 - Webforms
Model
Public Folder - Webforms with web.config to allow public access
Views
web.config with deny
I need to have the home controller public as...
I plan on building a simple, yet high usage webapp and need to settle on an architecture.
basic server side logic / dynamic db
driven content about half a dozen to
a dozen pages serving up all said
content
no need for URL rewriting,
pretty simple page flow/routing
The objective is to publish this app to use the least amount of band...
I've installed parallels desktop on my MacBook to be able to run Visual Studio 2008 in a XP installation. Everything works great except when I decided to put my websites in my sites folder in the os x file system (Which by default automatically happens because the My Documents folder is mapped to the Mac's Documents folder, and I'd rathe...
Hi
I am facing a weird problem:
I am encrypting the contents of a cookie.
My code works fine when I run it in Visual Studio, but gives me a "Bad Request, HTTP Error 400. The request is badly formed." when I run it from the server.
Here is the class for encryption Encrypt Cook.cs, resides in app_code:
public class EncryptCook
{
publi...
While rendering the view page, based on some condition in the controller action I want to disable all the controls (textbox, checkbox, button etc) present in the form in a MVC view page. Is there any way to do that? Please help.
...
I am using the Infragistics UltraWebGrid to capture some data. I don't have this grid bound to a datasource, I simply access the values I need when the user clicks a save button.
I need to add autocomplete functionality to one of the columns in this grid, easily achieved with an asp.net textbox and ajaxtoolkit autocomplete extender.
Pr...
Hello!
I'm developing an ASP.NET app (C#) that connect to SQL Server 2008 using ADO.NET entity framework.
The user of this app can select an image from his local hard drive to insert in SQL Server. How can I do this?
I know how to store the image into SQL Server but I don't know how to upload the image to the server (using FileUpload ...