Microsoft released ASP.NET MVC 1.0 RC (Release Candidate) today! Scott Gu has an interesting long post on the new features and changes. The main changes include integrated VS support for adding a Controller and View files, Cross Site Request Forgery Protection, scaffolding support and some form post improvements. This will help developers in building ASP.NET MVC based apps quickly and ea...
Today I've been reading about "Oslo". I even downloaded the CTP. The home page for Oslo is located here . What is Oslo? Well, go to the home page and check it out. What do I think it is? It looks like a new platform from Microsoft on which to model and design systems. There is even a new language for it called "M". There is a modeling tool that is part of the platform called "Quadrant". ...
Here I discuss the different formats of datetime. most of us facing this format relating issues during work with datetime. so these format may help u to display the date time format as we want . and it also help to reduce chances of exception. To get the system date and time separately in c# .just use the for date only: DateTime.Now.ToShortDateString(); for timeonly: DateTime.Now.ToShort...
C# credit card validation class Here a quick hitter for you - this little piece of code allows you to validate a credit card (in C#) before submitting for processing. This should work with Visa, Mastercard, Discover, and American Express. I'm not really sure where this came from...or if I even wrote this. I can't remember. But I hope it helps you in your everyday programming. using Syste...
In ASP.NET's Ajax Rating control there is a bug. When user click on the rating control it Jumps on the top of the page because it add # with url. If you put your rating control on the bottom of the page and you click on the rating control it jumps on the top of the page.This happens because your all image tag are in HTML's Anchor <a> tag and its href attribute set to # (view page s...
A Service Reference is the same as a Web Reference. that is, you can add an ASMX web service as a reference and it will generate your proxies/etc. just like Add Web Reference did. 1) Right click References and click 'Add Service Reference' 2) In the Add Service Reference dialog click Advanced 3) In the Advanced Dialog click 'Add Web Reference' 4) Continue as you normally would for an asm...
In my last blog post, " CSS Reset - What is it? " I covered and explained exactly what a CSS Reset is, I gave you some CSS code to make it happen, and showed you where to put it in your CSS file. If you haven't read that post, go read it now because this post picks up where that one left off. So...now that you have the CSS reset code incorporated in your CSS file, your going to have to d...
Sometimes while encrypting data using Rijndael and sending it in URL as query string parameter can lead you to a specific problem: The webpage cannot be found The problem occurs when the encrypted string contains one or more "/" (slash), like: http://www.mysite.com/q=3f4%^ffd#==fdf/ddfd Here the encrypted string is: 3f4%^ffd#==fdf/ddfd and it contains a "/". This will make the browser se...
Since the fine line between CSS/HTML coders and ASP.NET developer is becoming thinner everyday, I like to encourage all ASP.NET developers to become familiar with CSS. As you may know (or may not know) the major browsers (IE, Firefox, Safari) all use different HTML/CSS rendering engines. And because of this, they all interpret HTML and CSS a little differently. Now, the primary goal of a...
While exporting HTML in excel format you may encounter this error when opening the exported Excel file: The file you are trying to open, ‘XXX.xls’ is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. This bug cannot be fixed through asp.net code. Here is more information on t...
When we upload a file then there is validation for the extension of the upload file because if we want to uplaod a image then there is only image related extension is allowed not any other type as .doc,.txt,.rar ...... so to avoid this we apply there extension validation on the file. when user upload the file then we first check the extension of the file if extension of the file is corre...
Couple of month ago I had worked on e-commerce site, where I have to validate the credit card number. I have described some dummy credit card number by which you can test . 1. Master Card : 5431-1111-1111-1111 master card have 16 numbers starting with 5. 2.Visa : 4111-1111-1111-1111 or 4111-1111-1111-1 Visa have 13 or 16 numbers starting with 4 3: American Express : 341-1111-1111-1111 or...
Greetings all. As the title states, my name is Brandon Vicedomini and I am a software developer. I found this site through a network posting on LinkedIn. This site looks like an excellent forum to collaborate with the greater ASP.NET community. I look forward to reviewing articles and blogs on this site as well as contributing my own. My LinkedIn profile is http://www.linkedin.com/pub/di...
This entry describes how to add external tools under Visual Studio 2005 tools list. What types of tools we can add? We can actually add any executable(.exe) files under tools option in Visual Studio 2005. Here i am giving a specific example how to add ildasm.exe under tools option. 1.Open Visual Studio 2005. i.Go to Start--->Run ii. Type devenv.exe and click ok 2. From the main menu(t...
How to embed javascript in the HTML of a dynamically generated controls. Simple Scenario 1: We have a dymnamically generated button control and on button click in the client side we want to show the message "You have clicked me". Button button1=new Button(); form1.Controls.Add(button1); Simple Scenario 2: We have a textbox and if we change the text then in the client side we want to show...
When you set the mode of the TextBox is Password and retrive the password from the DB then the TextBox will be blank for security purpose If you want to display the password in the textbox in * format then we use following way to retrive the password in Textbox and the mode of the Textbox is Password. txtPassword.Attributes.Add("value","vijendra"); where txtPassword is the name of the Te...
File upload control is not working when this control is inside the update panel.When we place the file upload control control inside the updatepanel and upload the file then FileUpload1.Hasfile is always false because file upload control is inside updatepanel then your file upload control does not post back. Because the file upload control works only when the full page postback. If you w...
Many times we face situation like when we need to access the code behind variables from javascript as well as accessing javascript variable from code behind. I can remember a practical scenario in my previous project. The requirement was to draw a organizational chart ( What is Org chart? ). On mouse hover on each node of the chart a window should get opened and all the information about...
Scenarion : I have a user control and the user control consists of a textbox and a button control. I have a page and the page consists of one label control. What we want ? We want to set the text properly of the label control(of the page) with the textbox text value on the button click event of the user control. It is a very common scenario and many times in your code development you wil...
Here is a very simplified and quick explanation to Nullable datatypes: Nullable datatypes were introduced in Microsoft .NET framework 2.0 and can be very useful when dealing with database values which are optional and set to null (undefined). For example assume you have an integer variable X (int X;) and you are using some database table to fetch and store values in this variable. If the...
Many beginner developers get confused when the get this very common error like: Error: Cannot implicitly convert type 'int' to 'int?'. An explicit conversion exists (are you missing a cast?) Such compile time errors are common when developers try to cast from one type to the other. Sometimes the root reason for such errors might not be obvious to the new developers. Strongly typed langua...
Recently I had a somehwat "heated" discussion with a couple friends who owned software development firms focussing on custom Microsoft .NET development. The topic of the discussion was the quality of code being developed by the team of software developers. I strongly believe that no matter how non-technical the client is, the code quality should not be sacrificed even if the project dead...
I have used a Tinymce editor on a page and placed a required field validator to validate textarea. When I click the button at first time, it was gives a validaion error message even field was not empty, but at second time it submitted succesfully. Then I was tried some code which has solved my issue. The following describes how to use a validator along side TinyMCE to validate the conten...
Here we discuss to generate the textox at runtime. To create the textbox at run time for that first we take a server control Panel where we place the runtime generated textbox.Here we use a textbox and button,textbox to define the number of textbox generated at runtime ant generate the textbox on the button click. following is the code for .aspx side: <div> <asp:TextBox runat="s...
I was using modal pop up for both add and edit option on the same page. For this i used ModalPopupExtender of ajaxToolKit .But the problem which i faced was that when ever i clicked on the edit button.The pop up just came out but i didnt make any changes in the fields .So i clicked on the cancel button and the modal pop up just diappeared.The next time when i clicked on the add link the ...
It's fast, easy and free! Submit articles, get your own blog, ask questions & give answers in the forums, and become a better developer, faster.
enter your email address:
What kind of email newsletter would you prefer to receive from CodeAsp.Net?18