In a C# 2010 web form application, I want to maintain the scroll bar position in Panel1 listeb below. According to the following
Can you tell me how to maintain the scrollbar position of panel1?
Your reference material is for page scroll, the entire page on the browser.
You should search for panel or div scroll, or perhaps overflow scroll
I don't know off hand how to do that, but your code won't work on a div element
I was just looking at your webform, I can't see how that would even work or render into proper html.
You missing a form tag, so form events will not occur, your missing a body tag
This master page was handy, I stripped out irreverent information. But if you look closely, you'll see that a webform or even a master page, is just a html page designed for graphics and looks. You make areas or spaces that you can insert content into, called contentPlaceHolder's.
OK, so your going to tell me that your master page is very advanced, and that you inserted the proper tags in the contentPlaceHolders, and that everything is fine. There are no problems with the masterpage and webform.
But that sample will not render or function correctly.
Now I see why you can't things to work, it's because you don't have the basic understanding of how HTML works. I would hate to be the guy that has to modify your markup.
All in all, at least you posted some markup, which is brave and good. Now you just need to step back a day, and take a lesson in HTML, and then move forward.
Notice how I don't use asp.net objects for everything, I just use regular HTML tags. You only use them when you absolutely have to. They are not worth the time to use, unless you need them in code-behind to create elements.
<%@ Master Language="VB" AutoEventWireup="false" CodeFile="EN-US_Landing.master.vb" Inherits="EN_US_Landing"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><!-- Contents of this file are Copyright 2010, iCE5Commerce.com -->
The web pages you are looking at are part of the company website. I am using the same master pages that the entire company is using. All the login and inheritance between the different web form pages are obtained from the master web pages.
Content place holder 4 is where all the other web pages place their unique elements items for the web page. Thus I did the same thing. is that wrong?
In a C# 2010 web application, I have a regular expression validator that validates if a date is in mm/dd/yyyy format. The control works fine however the message quickly appears when the user enters the date and goes away. The message also appears when the user clicks the next button. I only want the message to appear when the user clicks the 'next' button.
The following is my code:
<div> <asp:RegularExpressionValidator ID="RegExpresValdate" runat="server" ControlToValidate="txtDate" CssClass="errorStyle"
ErrorMessage="Please enter date in valid format (mm/dd/yyyy).">
Can you tell me what I can do to have the message only display when the user clicks the next button?