Skip to main content

Posts

Showing posts with the label ASP.Net

window.location.href not working - asp.net

 window.location.href not working If we are calling function through a submit button. This may be the reason why the browser does not redirect. It will run the code in the function and then submit the page instead of redirect.  In this case Either 1. change the type tag of your button to button           2. you just need to add "return false;" at the bottom of your function

RadTimePicker, showing error as " 'SelectedDate' should be between 'MinDate' and 'MaxDate'".

The default minimum date for the RadDatePicker is 01/01/1980. So, when you try to assign the value this than this date you will get the below error: if you will set the Mindate of RadDatePicker to a minimum range than this will fix the issue ID ="RadDateofBirth" DateInput-DateFormat ="dd/MM/yyyy" MinDate =" 01/01/1940 "   DateInput-DisplayDateFormat ="dd/MM/yyyy" runat ="server"> This will solved the issue.

Redirect incoming requests to specific URLs in IIS 7

The Rule "aboutus" is redirect a specific page to a another page. The Rule "legal" is to redirect the all html files from a folder to a specific page. <system .webserver="">         <rewrite>           <rules>             <rule name="aboutus">               <match url="^about-us.html$"></match>               <action type="Redirect" url="/index.html"></action>             </rule>             <rule name="Legal">               <match url="^Legal/(.*).html$"></match>               <action type="Redirect" url="/index.html"></action>             </rule>          ...

Upload Multiple Files Using FileUpload Control In ASP.NET 4.5 +

ASP.NET 4.5 and upper versions support this feature. Now, FileUpload  control is built to support HTML 5, therefore it is only supported in browsers supporting HTML5. For other browsers it will work like a normal file upload control in ASP.NET. A new Attribute introduces with the ASP.NET 4.5 FileUplaod control i.e.  AllowMultiple ,  It takes either true or false. In order to support multiple file uploads, set AllowMulitple =" true " other than false. < asp:FileUpload   runat = "server"   ID = "UploadImages"   AllowMultiple = "true"  /> In addition to this control, some new properties have been included to support code-behind coding. HasFiles Check whether FileUpload control has multiple files or not. PostedFiles Basically used to get all the files from the FileUpload control in the iteration. Example code to upload files:    < asp:FileUpload runat ="server" ID ="UploadImages" AllowMultiple ="t...