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...?
Who would have thought it! It turns out that the solution is to supply a 'compact privacy policy' with your page. So, for every page that will be writing a cookie from an iFrame, include the following line of code:
HttpContext.Current.Response.AddHeader("p3p", "CP=\""IDC DSP COR ADM DEVi TAIi...
Good point. How about using onbeforeunload instead? I think Firefox recognises that one. My code above may need to be changed though because onbeforeunload works differently (from memory).
I should have mentioned that the page writing the cookie is in an iframe and I've now discovered that IE by default blocks such cookies as untrustworthy. Why can't Microsoft just follow the rules? If anyone knows a work-around I'd be enormously grateful. The iframe here is necessary.
Could you find a different method of passing the encrypted key to getimage.aspx, like maybe storing it in the session when the page containing the image loads...?
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...
Or you could use Javascript to make an AJAX call to a page that ends the session in response to the window.onunload event. I've used the following code which allows you to determine if the user has closed the browser...
window.onunload = function() {
// The following test determines if the...
Thanks tperri. However, I'm looking to create a custom control that contains numerous other controls as well as the button. I had tried adding them programmatically in the Render method (and they were not persisting across postbacks) but have since learnt about the AddChildControls method which...
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...
Give all these LinkButtons the same CSS class. Then using Javascript you can loop through all your anchor tags as part of a window.onload event handler. For each anchor with this class you can then add your onclick event handlers. So, if all these LinkButtons has the class 'do_confirm' just add...
As part of the window.onload function...
var processing = false;
document.getElementById('id_of_my_link').onclick = function() {
if (processing) return false;
else {
processing = true;
// Do the work and set processing back to false at the end
}
}
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.