Jump to content
Xtreme .Net Talk

scaldwe

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by scaldwe

  1. The back button is such a pain in arse!!! I have worked around this in the past a couple of ways ... both ugly but seem to work pretty well. 1. Force a forward on the body's onload event. (ok, so I was desperate) <body onload="history.forward();"> 2. Dynamically create all your elements via the code behind. If you don't have to allow them edit what they have just submitted. Hope this helps, or atleast points you in somewhat of a direction.
  2. I will for sure give that a try ... Thank You ...
  3. The UrlReferer is only valid or will have value when coming from or being "referred" by another page. So if a visitor hits your site from a desktop shortcut, favorites item, or typing in the url in the address bar, or anything of that nature there will be no referer to track in session. Now if you click on a link from another page ... then that page will become the referer page. If you have issues with it throwing exceptions I stop it by having a global static class function in most apps to take care of it like this .... public static String QString(String paramName) { String tmpS = String.Empty; try { tmpS = HttpContext.Current.Request.ServerVariables[paramName].ToString(); } catch { tmpS = String.Empty; } return tmpS; } Hope this helps ....
  4. It's not exactly the publish method you know in 2005, but there is a copy method. It's been a while but, I believe it copies everthing and not just what you need to run the app though .... I don't have 2003 loaded or I would check it for ya. Here is a decent article that covers the process and the reuirements depending on what you are trying to accomplish. http://support.microsoft.com/kb/326356
  5. The Page_Load and Next BtnClick code or however it's being filtered ... What I am needing is how the datagrid get's filtered and what funciton calls it ....
  6. Thanks for the reply ... it's hard to get a reply on stuff like this? Do you know of any good articles on the GAC ...
  7. How about using the ItemDataBound method ... //Set up a global variable for the Date DateTime globalDate; protected void DataGrid_ItemDataBound(object sender, DataGridItemEventArgs e) { if (e.Item.ItemType == ListItemType.Footer) { ((TextBox)e.Item.FindControl("txtDateValue")).Text = globalDate.ToString(); } } or something like that .... Of course you will need to bind your datagrid again, and make sure you are checking for IsPostBack so you won't bind twice .. If you have your datagrid binding on Page_Load this happens happens before the event that calls the postback so you will be binding it twice.. Or you can work your way through the rendered table hierarchy with FindControl .... What's always helpful to me is trace ... set trace=true on the page and it will show the rendered hierarchy ... FYI on master pages .... The master page is rendered as a user control (well basically) .... So you will have to use the correct hierarchy when trying to find anything with the FindControl method ... So if you try and use Page.FindControl it needs to now be Master.FindControl("ContentAreaControlInMasterName").FinControl("") .... That held me up a couple of hrs ... figure I would pass on the findings .. hopefully this is not too late and it's help maybe a little .....
  8. I am looking for a way to globalize the resx files for localization purposes. Like adding a reference to the Data Access Application Block ... Not in the App_Globalresources folder in my project. Right now, I have several apps that have three language resx files. English, Spanish, Italian. I have has been successful just copying each of the lang files into the new project. I would rather have a central resx file that I reference or include somehow into each project versus copy. Maybe something that could be setup in the GAC if I am thinking correctly .... Any Ideas
  9. Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. This is the error that I am frequently getting. I am not hosted on a web farm or a cluster it is running on VM Ware but I don't know if that makes a difference. The page I frequently get this error on has many controls including a Multi-View which seems to be more of a pain than it's worth at this point. But that's the way it's done so I will have to stick with it. I get the error only when posting back to switch between views. I have placed the work around in my web.config file. <pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never" /> I have also put this in the in the Page directive as well (<%@ page ...... viewstateencryptionmode="never" validaterequest="false %>) in the page itself. This work around came from a google solution that work for them but not for me. Just tried to implement my own validation key and override the machine key. Not sure if this is correct way to do it, I may be missing a step or two. <pages validateRequest="false" enableEventValidation="true" viewStateEncryptionMode="Auto" enableViewStateMac="true" /> <machineKey validationKey="9787878786A6B626362786B6C6A6873373933626A6B7364766E6F7A6D786C6B7765306E7638336E506A6B736E6476386E6A72686,IsolateApps" /> Pages works fine ... but still throws the error Occasionally... Any Ideas would be greatly appreciated.
  10. I have used this method before .. worked really nice: The panel doesn't render anything if it's not visible. So no worries about getting the table tags jacked up from a div tag in between the row tags. //HTML SOURCE <itemtemplate> <asp:panel ........... visible='<%# IsNotNewItem(whatever) %> ..... Row information here </asp:panel> </itemtemplate> //CODE BEHIND public Boolean IsNotNewItem(object param) { code here ... return trueorfalse; }
×
×
  • Create New...