asp.net

Is it possible to use the LoginView control in combitation with the server session in ASP.NET?

Is it possible to use the LoginView control in combitation with the server session in ASP.NAT? ...

AutoPostback with TextBox loses focus (question made clearer)

A textbox is set to AutoPostback as changing the value should cause a number of (display-only) fields to be recalculated and displayed. That works fine. However, when the field is tabbed out of, the focus briefly moves on to the next field, then disappears when the page is redrawn so there is no focus anywhere. I want the focus to be o...

Is anyone running a production ASP.NET site on top of Mono?

I'm trying to do an informal feasibility study for work on if Mono/Apache/Linux is realistically 'ready' and in any way comparable to a more traditional .NET/IIS/Windows stack. Any comparison of performance would be helpful too. ...

Best way to send data to aspx page in ASP.NET 2.0/3.5?

Which is Best way to send data to aspx page, and why? using query string using session using cross page postback Something else Thanks. ...

asp:TextBox ReadOnly=true or Enabled=false?

What's the difference between the Enabled and the ReadOnly-properties of an asp:TextBox control? ...

Using ButtonField or HyperLinkField to write a cookie in ASP.NET

I currently have a DetailsView in ASP.NET that gets data from the database based on an ID passed through a QueryString. What I've been trying to do now is to then use that same ID in a new cookie that is created when a user clicks either a ButtonField or a HyperLinkField. What I have in the .aspx is this: <asp:DetailsView ID="DetailsVi...

Why does RSACryptoServiceProvider.VerifyHash need an LDAP check?

I recently encountered an odd problem with RSACryptoServiceProvider.VerifyHash. I have a web application using it for decryption. When users running the web service were doing so over our VPN it became very very slow. When they had no connection or a internet connection they were fine. After much digging I found that every time RSACry...

Cookies and Objects

I'm having trouble figuring out how to access a cookie from a compiled object. I'm trying to make a compiled (DLL) object that will check the users cookie and then compare that to a database to confirm they have the correct access. I can pass in the cookie info fine and the component will work, but I'm trying to have the component chec...

Help with deploying Crystal Report embedded Visual Studio 2008 website.

I have been trying to get around this error for a day now and have not had much luck. I have a VS 2008 project that uses the embedded Crystal Reports which of course runs fine locally, but when deploying to my remote server the reports will no longer run. I gathered that it was because I didn't have the right Crystal Reports component...

How to set property to Guid in aspx page

I have the following code in one of my aspx pages: <% foreach (Dependency dep in this.Common.GetDependencies(this.Request.QueryString["Name"])) { %> <ctl:DependencyEditor DependencyKey='<%= dep.Key %>' runat="server" /> <% } %> When I run it, I get the following error: Parser Error Message: Cannot create an object of type '...

Should I create a JQuery server control for ASP.net to best use it in my apps?

I have been rather successful in promoting JQuery within my organization. No small feat on it's own. However, one of the ideas being kicked around here to make it part of our app is to create an ASP.net server side control. (We are going to be sticking with WebForms for the foreseeable future.) I'm not too wild about this approach as it...

ASP.NET Routing with Web Forms

I've read ASP.NET Routing… Goodbye URL rewriting? and Using Routing With WebForms which are great articles, but limited to simple, illustrative, "hello world"-complexity examples. Is anyone out there using ASP.NET routing with web forms in a non-trivial way? Any gotchas to be aware of? Performance issues? Further recommended reading I s...

ASP.NET/IIS6: How to search the server's mime map?

i want to find the mime-type for a given file extension on an IIS ASP.NET web-server from the code-behind file. i want to search the same list that the server itself uses when serving up a file. This means that any mime types a web-server administrator has added to the Mime Map will be included. i could blindly use HKEY_CLASSES_ROOT\...

How do you specify your Content Type in ASP.NET?

I'm specifying my doctype as xhtml strict, but it's being sent over the wire as a content type of text/html. I'd like to specify that the content type is application/xhtml+xm, but I can't figure out where, or if, I can configure this from within my application ...

Disable 2 buttons on form submission ( ASP.NET )

I have this solution for a single button: myButton.Attributes.Add("onclick", "this.disabled=true;" + GetPostBackEventReference(myButton).ToString()); Which works pretty well for one button, any ideas on how to expand this to 2 buttons? ...

Subtext install gives error in Medium trust level.

I am trying to install Subtext in a medium trust level environment (host: Crystaltech) and am getting the following error (see below). I was able to do the administration setup but when it tries to go to the blog for actual use, boom. I know I could "upgrade" the environment to a full trust level but I want to understand why the error ...

ASP.Net compiliation

I have a question about asp.net compiling. I know the different ways you can compile but my question is with the default method. Microsoft says that pages and code are compiled on their first use and then cached. My question is, when does that cache clear... when the app pool recycles? Or, does it cache it until it's changed even thr...

Is there a better way to verify if a request accepts JSON?

Actually, I'm using this way. Do you have a better way? private bool AcceptJson(HttpRequest request) { const string JsonType = "application/json"; if (request.ContentType.ToLower(CultureInfo.InvariantCulture).StartsWith(JsonType)) { return true; } if (request.AcceptTypes.Select(t => t.ToLower(CultureInfo.In...

How do I enable ViewState for child custom controls when disabled in parent?

I am trying to create a custom control that a "gridview" like control but specifcally for business objects that implement certain custom interfaces. In doing this I have come across the following problem. I have a control that I have disabled viewstate on (and I don't want to re-enable it) and it has a child control that I want viewst...

How do I tighten security of my hybrid ASP.NET 1.1 / Ajax solution?

Scenario I have an HTML/javascript website that uses javascriptSOAPClient communicate with an ASP.NET 1.1 web service in order to read/write to a SQL database. (http://www.codeproject.com/KB/ajax/JavaScriptSOAPClient.aspx). The database contains anonymous demographic information--no names, no credit cards, no addresses. Essentially the ...