What is the best way to manage connection strings in a web application, from a security standpoint? I've done it several different ways. I've stored them as plain text web.config setting keys. I've also created a "Constants" class that has public read-only string properties for each connection string.
Does anybody have any recommenda...
I have an aspx page which has a GridView and a Panel with Summary Data. The Summary Data is in a control and the GridView is on the aspx page. When someone clicks an item in the Summary Data, I want to rebind the GridView, but I can't figure out how to do it from the control.
I tried using FindControl, but probably did not use it corr...
Hi!
Is there any way to improve the performance of your IIS by changing some configuration parameters?
Or do you have any tips in general on how to improve the performance of a ASP.NET app?
Thanks!
...
Here's a simplified version of my page:
<asp:UpdatePanel runat="server" ID="dateUpdatePanel" RenderMode="Inline">
<ContentTemplate>
<asp:Label runat="server" ID="lblDateFrom" Text="From:" />
<asp:TextBox runat="server" ID="txtDateFrom" />
<asp:ImageButton runat="server" ID="cmdDateFrom" ImageUrl="~/images/calendar.jpeg" />...
<asp:BoundColumn DataField="pos" HeaderText="Principal Office" />
would it be possible to somehow...
<asp:BoundColumn DataField="postProccess(pos)" HeaderText="Principal Office" />
...so I could modify the value as needed?
CRAP:
A field or property with the name 'postProcess(pos)' was not found on the selected data source.
Anyon...
I have a Web content form and need to access a control inside the content panel. I know of two ways to access the control:
1 : TextBox txt = (TextBox)Page.Controls[0].Controls[3].Controls[48].Controls[6]
2 : By writing a recursive function that searches through all controls.
Is there any other easier way, since Page.FindControl doesn't ...
I generally prefer to add controls dynamically, like table and generic html controls, to the ASPX page, rather than add them in the ASPX page and set the properties dynamically.
Which approach is considered "better practice"?
Also is using generic html controls dynamically a better practice than outputting formatted html strings to an ...
My problem: When a user clicks an image button on an aspx page the codebehind creates a zip file and then I attempt to stream that zip file to the user.
To stream the file I'm using the following code:
FileInfo toDownload = new FileInfo(fullFileName);
if (toDownload.Exists)
{
Response.Clear();
Response.ContentType = "application/...
Sometimes J2EE-savvy people look at ASP.NET and wonder, where's the support for deploying an app as a single unit? JSP/Servlet apps can be deployed as WAR files, with all pages, content, metadata, and code in that single archive. The war file can be versioned, easily moved around. There's an assurance that the entire app is contained...
Is there a way to disable that annoying balloon notification that pops up when you start an asp.net application? Here's a picture of what I'm talking about:
http://i41.tinypic.com/2prd3b7.png
...
C# 3.0
ASP.Net 2.0
IIS6
I have a regular [non-https] page. There is the standard one ASP.Net form on the page.
There are two "areas" of functionality on the page though. Login and "Get Quote". The login page needs to POST to HTTPS while the rest of the page [including the "other area"] form can't be HTTPS. In Java [JSP] and regul...
Hi All,
How can i determine in a web server control (inherited from linkbutton) if an event handler is set for OnClick or OnCommand?
I rather not override the events and set variables... etc
Thanks all in advance
...
I'm making an ASP.NET Web page that generates pages from SQL when they're not cached. Their loading time could be between 300ms to 1.5seconds (No fix you database replies please).
I personally find these values to be too long, and was looking for a solution that allows me to inform the user that the page he is visiting will require a bi...
I would really like use the jQuery Validation plugin in my ASP.NET Web Forms application (not MVC). I find it easier than adding asp validators everywhere and setting the control to validate field on all of them.
I am just having some issues both when setting the class like this class="required email" which I think has something to do...
I have a case where i need to route a Web Service SOAP message through an intermediary server. Can anyone point me in the direction of some good resources on how to accomplish this?
...
Hi,
on our site we do url rewriting to generate massive amounts of database generated pages. on every page, there is a Login control for users. like this:
Internal aspx page: /DB.aspx?id=123
User visible url: /ABC/123.aspx, /ABC/456.aspx ... (url rewritten)
unfortunately, the tag on each page has an action attribute of "DB.aspx?id=123...
I am trying to get a subset of locally declared methods in a webform code behind using GetMethods but cannot figure out the proper BindingFlags settings (see code below)....and some further specific questions:
1) Is it possible to differentiate between Procedures and Functions?
2) Furthermore, I only want to fetch a certain subset of th...
I'm looking for the best way to implement a modal popup in ASP.NET of another ASP.NET page. I'm coding for Firefox 2.x+ and can use JQuery, but I'm not very familiar with it.
I see a lot of solutions that use "AJAX", but I'm not sure in what context, so I haven't gone down that route.
...
I am using Login Control available in ASP.NET 2.0 in the login page. Once the user is authenticated successfully against database, I am redirecting the user to home.aspx. Here, I want to pass on the User's name too to the home.aspx so that the user will be greeted with his/her name in the home.aspx. Ex: Welcome Smith
I am extracting th...
<machineKey validation="SHA1" validationKey="<64-byte key>"
What exactly does the validationKey do? Say I create a hash with SHA1. How does the validationKey play in to it?
Consider this code:
HMACSHA1 hashSha = new HMACSHA1(_validationKey);
byte[] ret = hashSha.ComputeHash(bytes, offSet, count);
return ret;
We are generating a new...