On SQL Server 2000 I've created a few tables directly using the SQL CREATE TABLE syntax but the tables I've created are not appearing in my list of available table names when creating a diagram. What else must I do to make these tables appear...?
I'm using the following code to write a cookie...
HttpCookie objCookie = new HttpCookie("TCS_DATA_REQUEST");
objCookie.Expires = DateTime.Now.AddYears(1);
objCookie.Values.Add("TCS_DATA_PROVIDED", "yes");
Response.Cookies.Add(objCookie);
...and then as part of a subsequent page load I'm using...
I'm trying to create a custom control library for the first time and I'm a bit stuck. I need a custom control that contains a button which, when clicked, fires a custom event. If it were a user control this would be easy because I could write a Button control into the ascx file and set its event...
Part of my Render method in a custom control contains the following code...
DropDownListOfStaff.Items.Add(new ListItem("test", "test"));
DropDownListOfStaff.RenderControl(writer);
...where DropDownListOfStaff is a DropDownList instantiated programmatically. The rendered HTML has this SELECT...
I hope someone can get their head round this because it's driving me nuts! I have the following static method in a class called Pie which returns a random hex value:
public static string RandomHex()
{
string strValidChars = "0123456789ABCDEF";
string strRandomHex = String.Empty;
Random...
I have an application that occasionally errors on postback because a user has included reserved HTML characters in one of the many forms. I don't want to set Page.ValidateRequest to false in this case because security of this system is important, so for now I just want to provide users with a...
I want to access the 'script' tags in the HTML HEAD section of my page from the server but adding the instruction runat="server" to them seems to cause all sorts of strange behaviour. For example, simply adding runat="server" to a single script tag on the login page for one of my apps gives the...
I run ASP.NET intranet applications which use a lot of client-side Javascript all located in external .js files. If I make a Javascript change I can't guarantee my users are running the latest script (since these files are cached by the browser) so I'm always sending out a message to ask users...
Hi,
I'm using the System.Web.HttpContext.Current.Request.QueryString collection as part of a method but am getting some odd behaviour if any of the query string names contain an underscore. For example, if the URL is...
I want to run some code immediately before a user session ends. I'm holding a user object in that session and when the session times out or is abandoned I want to pick up that user object and use it to clear out locks in the database before it is destroyed from the session. I've tried doing this...
I'm running a web application which uses an AJAX script to post data to a form in a separate file but on the same domain. The application is configured to use Windows authentication. When the AJAX script is activated though I receive a network username/password prompt. If I provide my network...
I'm running an ASP.NET application on a local intranet. One form has a button than uses AJAX to post a form in the background. I'm finding that when clicking this button for the first time I receive a network login prompt to access the web server. Once a valid network account is provided I'm not...
I'm getting the error "A potentially dangerous Request.QueryString value was detected from the client" relating to the following URL: contact.aspx?id=t63ONOALoPYjbYmGBjmSDg%3d%3d&log=true
The id part is an encrypted string that has also been passed to the Server.UrlEncode method to make it...
I have a web form that employs the following method attached to a button click to export a datagrid to either Excel or Word (by passing the string "xls" or "doc" as the parameter)...
private void ExportReport(string extension)
{
Response.Clear();
Response.AddHeader("content-disposition"...
I have an iframe which, in certain circumstances, needs to nullify the onbeforeunload event of its parent window. I thought I could just use window.parent.onbeforeunload = null; but this doesn't seem to work. Can anyone help? Before anyone gets huffy about the use of frames and IE-only events, I...
I have a SQL Server stored procedure that takes a long time to execute. I want to allow users of a ASP.NET web form to execute this stored procedure but to have it run in the background rather than have the page wait for it to complete. Is there a way to do this?
I was using Windows authentication in a ASP.NET 1.1 intranet app I'm writing. Now trying to change to FormsAuthentication which I believe I've set up correctly. The problem is that the login creates a user object then calls... FormsAuthentication.RedirectFromLoginPage(thisUser.Name, false);
When...
Anyone know how to gain access to a datagrid's header and footer rows if you're not inside a datagrid item event handler? e.g. I want to bind a datagrid, then later in the code update a value in the footer...
Hi, sorry if I'm not in the correct forum. If I have an intranet application in a directory c:\inetpub\wwwroot\myapp\ on a server called myserver it will be accessible using the URL http://myserver/myapp/. But I want to hide the server name and root directory from users e.g. so the above...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.