Thanx, will definitely check it out...
Clean code is the key to happiness.
Thanx, will definitely check it out...
Clean code is the key to happiness.
IE 6 behaves differently to IE 7 and above and Mozilla based browsers in respect to block-level element heights. In order to resolve your issue you will need to specify browser specific CSS to cope such as: /* Style to target IE 6 */ .styleForListWrapper { height: 300px; } /* Override styles for IE 7 / Mozilla */ html>body .styleForListWrapper { height: auto; min-height: 300px; } IE 6 allows block level elements to grow with their content whereas other browsers do not. Therefore specifying the min-hegith property will allow these other browsers to grow as required. Hope this helps...
Clean code is the key to happiness.
Why don't you just store the connection string in a session variable, then it will be associated with each user and remain with them whilst they are logged in?
Clean code is the key to happiness.
Hi All, I have been investigating a production issue for the past couple of days and hope that someone out there might be able to help. Situation: I have deployed a web application (IIS 7, Windows Server 2008). The website makes extensive use of AJAX and at certain points dynamically loads User Controls. These dynamically loaded user controls allow users to specify certain parameters to pass to SRSS reports. The reports are run in local mode on a separate web form by using the ReportViewer control. The web form is opened by simply calling the JavaScript window.open() method, passing the required parameters. Issues: There are two issues that occur, but ONLY if the website is run as a stand alone application, as opposed to running from a virtual directory under a web application i.e. http://url.co.uk does not work, http://url.co.uk/dir works: 1) If the dynamically loaded User Control contains a link to an external JS file, you are prompted for Windows Credentials. 2) If the JS is inline within the User Control, issue 1) is Ok, but then attempting to open the report and run it again prompts for Windows Credentials. I have played around with all permutations of permissions and impersonation within IIS and the Web.config, but nothing has worked as yet. If anyone has any ideas it would be greatly apprciated! Thanx
Clean code is the key to happiness.
Apologies if this is not in the correct forum, but hopefully someone can help with the below issue: I have a C# Windows Service (.Net 2.0) that is to be installed on a collection of web servers in the DMZ. The Windows Service implements a FileSystemWatcher to check for changes to a set of specific CSV files held on a network share, and will copy locally any updated files before importing these to a local SQL database. The distribution server that will hold the updated CSV files is also in the DMZ. The problem: How can I set up the Windows Service / distribution server so that the service can access the network share securely? It seems that no matter how I set the service up i.e. running as LocalSystem, LocalService, NetworkService or a specific user account (can only be a local account as no access to AD in the DMZ) I get System.UnauthorisedAccessException's occuring when attempting to set up the FileSystemWatcher. Any help would be greatly appreciated.
Clean code is the key to happiness.
Had a feeling that was the case. Thanx for the quick response...
Clean code is the key to happiness.
Hi, Not sure where the best place for this question would be, but hopefully someone might be able to help. I have developed a .Net 2.0 windows service that utilises the MS Office Excel 12.0 PIA. I am looking into the implementation of this service onto a number of production web servers and ideally would like to not have to install the full version of Office 2007 onto each server. It is possible to download the Office 2007 PIA redistributable package, but Office 2007 must be installed as a prerequisite. Is there anyway I can utilise the Office Interop's on a server that does not have Office installed? Thanx, and apologise if this is posted in the wrong forum...
Clean code is the key to happiness.
The best way to achieve this would be to use regular expressions through JavaScript. When the page loads you would save a global variable, or hidden field, that contains the value of the TextBox and on every keystroke within the TextBox, call a JS funtion that uses RegEx to determine whether the current value is different from the original. The original value would be used in the compilation of the expression. If you Google RegEx and JavaScript, there are plenty examples out there that will show you what is required. Basically, based on the result of the RegEx test you will get a boolean value telling you if the values are the same (case differences will be picked up) and you then enable / disable the Save button as required.
Clean code is the key to happiness.
I take it the JS calendar is being displayed via a standard onclick event linked to an image or button? If that is the case then simply populate a global variable with the current date (textbox values) prior to displaying the calendar and then add logic after the calendar has closed to call a function thats checks if the date has changed and then filter the treeview accordingly. Manipulating DOM elements directly through JS does not fire DOM events.
Clean code is the key to happiness.
Hi, this can simply be achieved by utilising the onfocus
and onblur
DOM events that controls such as textboxes expose. To hook up your controls to these events you would do something like the following: In your ASPX page: <asp:TextBox id="textBox1" runat="server" onfocus="showMessage('This is textBox1');" onblur="showMessage('');" /> <div id="messageHolder"></div>
In your JS file (or simply in a script block on your ASPX page) function showMessage(message) { document.getElementById('messageHolder').innerHTML = message; }
Clean code is the key to happiness.
If you simply want to check the individual characters of the input string on the server, then something like the below would do the trick: Dim fEmptyBefore As Boolean For Each ch As Char In stringInput If [Char].IsWhiteSpace(ch) Then fEmptyBefore = True Else If [Char].IsLetter(ch) Then If [Char].IsLower(ch) AndAlso fEmptyBefore Then ' We have a lower case letter at the start of a word Else If [Char].IsLower(ch) And Not fEmptyBefore Then ' We have an upper case letter in the middle of a word End If End If fEmptyBefore = False End If Next
You can then handle any instances where the casing is not as expected and take appropriate action. If you wish to validate / check the input on the client then there are ways to do this using JavaScript, but it would depend on what it is you are trying to achieve as to how you would approach the problem.
Clean code is the key to happiness.
Have you thought of using JavaScript and not using the UpdatePanel control at all? From experience the UpdatePanel is not a great control and if all you are looking to do is toggle the display of a block-level element, then the following would be far easier in my opinion: Your JavaScript... function toggleDisplay(toggleDiv) { toggleDiv = document.getElementById(toggleDiv); if (toggleDiv.style.display != 'none') toggleDiv.style.display = 'none'; else toggleDiv.style.display = 'block'; }
Your HTML... <asp:Button OnClientClick="toggleDisplay('toggleDiv'); return false;" ID="btn_search_by_area1" runat="server" Text="Search Sub Dep." /> <div id="toggleDiv"> ghjgjhgg </div>
Clean code is the key to happiness.
Hi, You will need to ensure that the code to populate the TextArea is not being fired on PostBack. If it is then the control is updated with the old value prior to the button event firing i.e. if (!IsPostBack) { TextReader tr = new StreamReader(textpath); textarea1.Value = tr.ReadToEnd(); tr.Close(); }
This will ensure your code is only run once when the page first loads. Hope this helps...
Clean code is the key to happiness.
Hi, This behaviour is being caused by the default behaviour of the button ContentTemplate. You will need to define a new ContentTemplate for your button by using a ResourceDictionary and build the required elements as part of the new template. From the new template definition you will also be able to specify any mouse or keyboard related events that require animation. See below for further information: http://msdn2.microsoft.com/en-us/library/ms771597.aspx Hope this helps...
Clean code is the key to happiness.
Can you please explain a little more about what it is you are trying to achieve. Thanx...
Clean code is the key to happiness.
Hi, The AutoCompleteExtender control was not really designed to be used with a DropDownList, as it can only return a string array to the client. If using a TextBox, as oppossed to a DropDownList, is not a viable option for you then you may need to look at writing a custom control that extends the functionality of the AutoCompleteExtender to return name/value pairs.
Clean code is the key to happiness.
Hi, Simply add an alert message after checking the value length: function checkEntry() { if (document.getElementById('textBox').value.length == 0) { alert('Value is required'); return false; } return true; }
Clean code is the key to happiness.
Can be done very simply using JS. Just perform the DataGrid's data binding in Page_Load and add this to the page within a script tag: setInterval("document.forms[0].submit();", 10000);
Clean code is the key to happiness.
Hi, Use this.GetType().BaseType.Name
to get the class name or this.GetType().BaseType.FullName
for the namespace heierarchy + class name.
Clean code is the key to happiness.
Hi, If you took my code as was then you would need to change the type of the input control to submit, rather than button, as that will then cause a postback e.g. <input type='submit' value='Submit' onclick='return checkEntry();' />
Clean code is the key to happiness.