Be careful when storing a model in a
session. It will behave differently
than you expect and can easily get out
of sync with the database. Instead of
storing the model directly in the
session, store the id to the model and
use that to fetch it from the
database.
Is it best practice like above to just put the id of the ...
For instance I was looking at the request from a asp.net application and it passes a view state form variable when the form is submitted that looks like this:
__VIEWSTATE:/wEPDwUJMzc4ODIxMTU4D2QWAgIBD2QWCgICDxYCHgRUZXh0BQVlbi1VU2QCBA9kFgICAQ8WAh4JaW5uZXJodG1sBTlDV0RTIC0gQ2VydGlmaWVkIFRBQS9XSUEgVHJhaW5pbmcgUHJvZ3JhbXMvUHJvdmlkZXJzIExpc3R...
I've tried to wrap up my problem with a complete example below - the original problem is part of a jQuery plug-in that I'm writing to extend the behaviour of an ASP.NET ajax application I already have.
The aspx page below has one drop down list which is marked for auto post back. I've also bound a change event using jquery (which ultima...
I'm generating a barcode image as the response from an HTTP handler, like so:
public void ProcessRequest(HttpContext context)
{
context.Response.Clear();
context.Response.ContentType = "image/Jpeg";
MemoryStream ms = new MemoryStream();
Bitmap objBitmap = GenerateBarcode(context.Request.Params["Code"]);
objBitmap.Sa...
Hello Guys,
I have many hrefs(with dynamic Ids) in my asp.net app that have the same CssClass=MyClass.
I want these button to be hidden with a condition.
I used the .ready
$(document).ready(function() {
if(condition)
$('.MyClass').css("display","none");
});
the problem is docuement.ready doesn't execut when there is a poctba...
I'm looking for a way to intercept the ASP.NET processing pipeline in such a way to be able to register event handlers to all events on the Page class. The reason is, I need to maintain a session-bound instance of a component that needs to be notified of all important Page events, starting from OnPreInit.
There's an arbitrary number of ...
I have a .net webservice I am consuming in PL SQL using utl_http (Oracle 10G).
The webservice call times out on every other call right now. This is only happening when I execute the PL SQL block, if I use something like SOAPUI I can spam requests.
My code is following this example http://www.lostechies.com/blogs/joshua_lockwood/archive...
I have an ssl certificate set up and when I use the https prefix google chrome puts a skull next to it and crosses out the https. Heres what the security information says:
The identify of this website has been verified by go daddy secure certification authority.
Your connection is encrypted with 128bit encryption...However, this page i...
I looking single ajax calendar extender for multiple text boxes and (calendar) image controls?
how can we do that? I found below good article on textboxes (not calendar images) controls.
Please help me to get this with image controls also
link text
...
I'm trying to use VS2010 to Publish a web app on my box to another web site on the same box. The Publish operation succeeds, but any pages that use the asp:ScriptManager tag are broken. I know there's an issue with the ScriptManager and FIPS security policy, but my app is using AES.
Some other random config info:
I'm using VisualSVN (...
UPDATED: Added some sample code to help clarify.
Hi, Feel like this shouldn't be that complicated, but I think I just don't know the proper name for what I'm trying to do. I'm dealing with an ASP.net project.
The concept is pretty simple:
I have a library that supplies some ecomm functions.
One class in the libary contains functions a...
Update: I can't delete this question, because the answer has been upvoted, yet it is not at all the answer to what I'm asking. I'd like to delete this, as it has been a week with no answer, and it's just dragging down my accept %. Thanks.
I have a strongly typed master page that includes information that is based on the currently aut...
I have defined this in the web.config of a subdirectory
<namespaces>
<remove namespace="App"/>
<add namespace="Tom"/>
</namespaces>
App is imported in the parent web.config file, Tom and App have classes with the same names.
To avoid errors resulting from ambiguous class names I removed the App namespace from the sub-directory ...
Precondition: There's a web application that leverages ASP.NET security model. There's also an Active Directory (AD) integration component. It provides AD users and roles as if those are application's own users and roles. The relations like "is in role" between AD user and AD role are stored in AD domain, of course, but are cached by the...
I recently started using IConfigurationSectionHandler as a custom configuration section for my BL DLL. I'm using it inside web.config files to pass settings values to the BL DLL.
While it reads the local web.config perfectly, the problem is reading a global configuration file (root web.config) that consists of shared settings.
How can ...
I want to be able to quickly deploy updates to a site that is fairly busy. For smaller sites I would just FTP the new files over the old ones. This one, however, has a few large dll's that regularly get updated and while they are copying the site is effectively down (plus there is the hassle of making backups of them in case something go...
I want to change some elements text when page is leaving the server (page_render, endRequest etc.).
How can i get access to the page and how can i find the elements to change their values, texts?
...
Hello all,
I've been implementing the Forms Authentication in ASP.NET with C# (v3.5).
I created a simple login form, when the users' email & passwords are stored in my SQL db.
When I login in my localhost, everything works just fine, but when I published the project and uploaded it on to my production web server, things got a little b...
How could i paly a video & audio file on an asp.net page so that the file is determined on the run time
...
I intend to build a HttpModule in order to scan a response's source and make small adjustments, mainly altering urls (hrefs, actions, srcs, etc).
I see the HttpApplication has a plethora of events that can be handled and I'm not sure of the best stage at which it's safe to alter the HTML content that goes back to the browser.
I need to...