Asp.net Controls: Important Controls in Web Site Development
ASP.NET is developed and marketed by Microsoft to allow web site development services build dynamic websites, web services and web application. This web application framework was first released in January 2002. It initiated with the version 1.0 of the .NET Framework. ASP.NET proved to be the best successor to Microsoft’s Active Server Pages (ASP) technology.
The ASP.NET framework is built on CLR or Common Language Runtime, allowing programmers to write ASP.NET code using any supported .NET language. This web application framework has many easy interface controls for hassle-free programming. These controls are very important in web development services. Following controls are available on ASP.NET:
Validation Controls:
In simple terms, validation controls are also called as conditional controls. These controls allow programmers to test a user input. These controls are mainly required to test a specific value or characters or a pattern of characters. Web site development services use validation controls to check that a value lies within a range. This also helps them to compare and take a validation service.
User Controls:
Programmers need user controls for employing a particular control at many places. User controls follow the same web form structure. A web development service includes web form user controls for creating menus, toolbars and other elements which are reusable.
HTML server controls:
These set of controls are of great help to expose an object model that maps very closely to the HTML elements. This helps a web site development service to work more freely in HTML programming.
Web Server Controls:
A web site development service uses these controls because they boast many features. Web server controls contain special controls like calendars and form type controls such as text boxes and buttons. These controls are more conceptual than HTML server controls and have more features.
There are many other controls used, but mostly for mobile applications. The controls are used to create web forms related to mobile devices.
I am the webmaster at www.synapse.co.in – a web development services company offering numerous services, such as flash web development, flash scripting, offshore software development, website development, and website maintenance services.
Article from articlesbase.com
More ASP.NET Articles
Controls Available in Asp.net
There are number of ASP.NET controls some of these are explain bellow.
• HTML server controls:- HTML elements helps server so we can use for us in programming . HTML server controls expose an object model that maps very closely to the HTML elements that they render for so we can get HTML server control in programming.
• Web server controls:- These Controls are more features than HTML server controls because as name suggest these are on web so helps lots. Web server controls not contains only form-type controls such
as buttons and text boxes, but also contains some special-purpose controls such as a calendar. Web server controls are more abstract than HTML server controls in that their object model does not necessarily reflect HTML syntax.
• Validation Controls:- These collect logic or we can say conditional controls that allow us to test a user input. We can simply attach a validation control to an input control and test what the user input in the input control. Validation controls are provided to allow you to check for a required field, to test against a specific value or pattern of characters, to verify that a value lies within a range, or we can also compare and also take a validation summary.
• User Controls: – These controls are helpful where we have to use that particular control at many places. We can include Web Forms user controls in other Web Forms pages that help in creating menus, toolbars, and other reusable elements.
•Other controls:- These control are likes for mobile devices. For creating the mobile application we use same framework which we use for web application, but we create Mobile Web Forms instead of Web Forms
pages and use controls specifically designed for mobile devices.
Learn Interview Questions Answers and face interview confidently
To know more about Dot Net Framework visit dotnetquestion.info. You can also find Dot Net Jobs in gurgaon, delhi, ncr, noida by visiting this site.
Article from articlesbase.com
Asp.net Reporting Controls
The asp.net reporting is so easy to use. Do not be overwhelmed by the terms that you might encounter. Just know the basics and you are good to go. If ever it is taking some time for you to make your report using asp.net reporting, try to crack what exactly it asks from you. The minute you get the hang of it, you will see that it can definitely make your preparing for reports easier.Most importantly, the.NET reporting controls enable users to generate reports and presentations from the scratch. The automated report convertor wizard can also be used through which the user can makes reports which are made over some other reporting software application. The ASP. NET reports retrieve the data and information from previous reports and then incorporates them in the contents.Some of the users also get to the Microsoft access features which are just like reporting in ASP. NET reporting, but there are various other benefits and advantages of. NET reporting because of its extended tools and functionalities. ASP. NET reporting allows the user to have a full control and access over the data. Complicated reports are just a matter of few minutes; the user does not need to crack out a code for it, which is effective and time saving. The report viewing controls in ASP. Net are useful in figuring out the authenticity of the website over the reporting services and reports. The users can grant permissions and access over the reports using the ASP. NET applications easily without dealing with authorization and authentications. One of the primary issues with report viewer in the Internet environment is that due to vague and unclear error messages, it becomes extremely difficult to diagnose and identify the problem area. The remote reports are hosted over Microsoft’s SQL server. The report viewing control is then used as a displaying mechanism to a report which is already published and defined in the report server. The report server processes all the data and information of the report all by itself. The remote reporting is geared towards the large-scoped applications which are in generally in an enterprise environment. The local reporting is geared towards the costumed web based applications. The local reports are processed and modified by the clients’ software’s and application via the reporting viewing controls. The report viewing controls all the web-application developers to take control and leverage over full and completed featured reports while they present them to the users in an intuitive and easy to use interface. The reports may contain multidimensional, aggregated and tabular data in it. The report viewer also possesses the costumed applications making it more effective and user-friendly. The.NET applications are available to assist users in displaying and storing the data in a structured and organized manner and let your web page display large quantities of data via a visual interface in an effective and efficient manner. The report viewing applications allow the user to utilize two kinds of reports after getting some configuration through the web.config files, which are; the local reports and the remote reports.
rel=”nofollow” onclick=”javascript:_gaq.push(['_trackPageview', '/outgoing/article_exit_link']);” href=”http://perpetuumsoft.com/Report-Sharp-Shooter.aspx”>.net report
Here you will learn more about asp.net reporting and
Article from articlesbase.com
blog.dmbcllc.com One of the new controls that Visual Studio 2008 brings us is the ListView. Now, the ListView control is really several different controls all rolled into one. There is a lot to see with this control. So, today is just going to be a small introduction. We’ll come back another day and do a presentation that goes deeper than we have time for today. So, what we are going to do here is put the control on the screen, show you the different presentations it can give you and then talk a little bit about how the new DataPager works with this control.
Video Rating: 4 / 5
Find More ASP.NET Articles
ASP.NET 4.0 Hosting :: Data Web Controls Enhancements in ASP.NET 4.0
Traditionally, developers using Web controls enjoyed increased productivity but at the cost of control over the rendered markup. For instance, many ASP.NET controls automatically wrap their content in
for layout or styling purposes. This behavior runs counter to the web standards that have evolved over the past several years, which favor cleaner, terser HTML; sparing use of tables; and Cascading Style Sheets (CSS) for layout and styling. Furthermore, the elements and other automatically-added content makes it harder to both style the Web controls using CSS and to work with the controls from client-side script.
Disabling The Outer Table in Templated Controls
In ASP.NET 3.5, a number of Web controls that use (or can use) templates automatically wrap the rendered templated content within a
element. One such control that displays this behavior is the FormView control. To see how the FormView wraps the output in a elements for styling purposes. These tags can now be optionally suppressed with a new property, RenderOuterTable. Similarly, the CheckBoxList and RadioButtonList controls’ RepeatLayout property has been expanded to include two new settings – OrderedList and UnorderedList – which offer developers alternative ways to influence the markup generated by these controls.
Also, the ListView control has been tidied up a bit, making the LayoutTemplate optional.
What is so SPECIAL on ASPHostDirectory.com ASP. Net 4 Hosting?
We know that finding a cheap, reliable web host is not a simple task so we’ve put all the information you need in one place to help you make your decision. At ASPHostDirectory, we pride ourselves in our commitment to our customers and want to make sure they have all the details they need before making that big decision.
We will work tirelessly to provide a refreshing and friendly level of customer service. We believe in creativity, innovation, and a competitive spirit in all that we do. We are sound, honest company who feels that business is more than just the bottom line. We consider every business opportunity a chance to engage and interact with our customers and our community. Neither our clients nor our employees are a commodity. They are part of our family.
The followings are the top 10 reasons you should trust your online business and hosting needs to us:
- FREE domain for Life -ASPHostDirectory gives you your own free domain name for life with our Professional Hosting Plan and 3 free domains with any of Reseller Hosting Plan! There’s no need to panic about renewing your domain as ASPHostDirectory will automatically do this for you to ensure you never lose the all important identity of your site
- 99,9% Uptime Guarantee – ASPHostDirectory promises it’s customers 99.9% network uptime! We are so concerned about uptime that we set up our own company to monitor people’s uptime for them called ASPHostDirectory Uptime
- 24/7-based Support – We never fall asleep and we run a service that is opening 24/7 a year. Even everyone is on holiday during Easter or Christmast/New Year, we are always behind our desk serving our customers
- Customer Tailored Support – if you compare our hosting plans to others you will see that we are offering a much better deal in every aspect; performance, disk quotas, bandwidth allocation, databases, security, control panel features, e-mail services, real-time stats, and service
- Money Back Guarantee – ASPHostDirectory offers a ‘no questions asked’ money back guarantee with all our plans for any cancellations made within the first 30 days of ordering. Our cancellation policy is very simple – if you cancel your account within 30 days of first signing up we will provide you with a full refund
- Experts in ASP. Net 4 Hosting – Given the scale of our environment, we have recruited and developed some of the best talent in the hosting technology that you are using. Our team is strong because of the experience and talents of the individuals who make up ASPHostDirectory
- Daily Backup Service – We realise that your website is very important to your business and hence, we never ever forget to create a daily backup. Your database and website are backup every night into a permanent remote tape drive to ensure that they are always safe and secure. The backup is always ready and available anytime you need it
- Easy Site Administration – With our powerful control panel, you can always administer most of your site features easily without even needing to contact for our Support Team. Additionally, you can also install more than 100 FREE applications directly via our Control Panel in 1 minute!
Happy Hosting!
element automatically added to the markup defined in the template. In short, the FormView control wraps its templated content within a one row, one column table, whether we like it or not.
The FormView renders this outer
to express style information. The FormView has a property named RowStyle, which contains a variety of substyles (BackColor, Font, BorderColor, and so on). For example, if the RowStyle’s BackColor and Font-Size properties are set to Red and Larger, respectively, the FormView will render the following markup:
Beverages
Soft drinks, coffees, teas, beers, and ales’
Note how the
(specifically the element) specifies the style as defined by the FormView’s RowStyle property. Therefore, this outer element is useful when using the RowStyle property, but is extra cruft if the RowStyle property is not being used or if the style information is specified directly in the template’s markup (using CSS classes, ideally).
ASP.NET 4.0 adds a new Boolean property to the FormView and a host of other Web controls named RenderOuterTable. This property, when set to True (the default), renders the outer
element as was done in ASP.NET 3.5 and earlier versions. If this property is set to False, however, then the outer is omitted.
Taking our earlier FormView example, let’s see what would happen if we set RenderOuterTable to False.
‘
With that minor change, the rendered markup for the FormView no longer includes the outer table. Instead, the FormView renders just the contents of its template(s), as the following snippet of HTML shows:
Beverages
Soft drinks, coffees, teas, beers, and ales’
When RenderOuterTable is set to False, any styles that are expressed through that outer table are no longer rendered. In short, any style settings to the RowStyle property will be ignored when the above FormView is rendered.
In addition to the FormView, the RenderOuterTable property has been added to the following Web controls in ASP.NET 4.0:
- Login
- PasswordRecovery
- ChangePassword
- Wizard
- CreateUserWizard
ListView Control Enhancements
The ListView control displays a set of data records using templates. Like the GridView, the ListView supports paging, sorting, editing, and deleting data. It can also be used to insert data. Developers using the ListView control in ASP.NET version 3.5 had to provide at least two required templates:
- ItemTemplate – specifies the markup rendered for each item bound to the ListView
- LayoutTemplate – specifies the ListView’s encasing markup and contains a Web control that indicates where the ItemTemplate’s markup should be placed
In most scenarios, the LayoutTemplate would contain nothing but a Web control to specify where the ItemTemplate’s markup should appear, resulting in a ListView with markup like the following:
…
The LayoutTemplate in the above example serves no purpose other than to say, “Here is where the ItemTemplate markup should go.” Regardless, with ASP.NET 3.5 you still had to define this LayoutTemplate explicitly in the ListView’s markup.
The good news is that with ASP.NET version 4.0 you can omit the LayoutTemplate – the ItemTemplate is now the only required template in the ListView. The following snippet of declarative markup shows this new abbreviated syntax:
…
New RepeatLayout Options for the CheckBoxList and RadioButtonList Controls
The CheckBoxList and RadioButtonList controls display a set of check boxes or radio buttons based on some data and are useful for building a set of check boxes or radio buttons based on a database query. Both of these controls have a RepeatLayout property that dictates how the series of check boxes or radio buttons are laid out. In ASP.NET 3.5 there were two possible settings for this property:
- Table (the default) – lays out the items using a
element. By default, each check box or radio button is laid out in its own table row. Use the RepeatColumns property to have a fixed number of check boxes or radio buttons displayed per row
- Flow – lays out each check box or radio button in a element with a line break (
) after each element, by default. The RepeatColumns property, if set, indicates that a line break should only be rendered after a certain number of check boxes or radio buttons.
ASP.NET 4.0 adds two additional settings to the RepeatLayout property:
- OrderedList – lays out the items using an
<input id=”…” name=”…” type=”checkbox” value=”1″ /><label for=”…”>Beverages
<input id=”…” name=”…” type=”checkbox” value=”1″ /><label for=”…”>Condiments
<input id=”…” name=”…” type=”checkbox” value=”1″ /><label for=”…”>Confections
).
The idea with the OrderedList and UnorderedList options is that the check boxes or radio buttons can be laid out using CSS. There are many web pages that discuss how to use CSS to layout elements in ordered and unordered lists.
Conclusion
ASP.NET 4.0 gives Web Form developers greater control over the rendered markup. Many templated controls that had previously added
At ASPHostDirectory.com, our mission is to provide a range of innovative, reliable and easy-to-use Internet solutions to our customers and to support them with unprecedented, personalized support. For more information, visit http://www.ASPHostDirectory.com.
Article from articlesbase.com
Avoid Hidden Controls – ASP.NET
Web Application is stateless. To maintain the state of the page we have many solutions like query string, session, hidden controls and more..
Hidden controls are primarily used to keep some kind of key value pairs for the page. To maintain multiple key value pairs, we need to have multiple hidden controls on the page and hidden control name will be used as key. Basically the concept behind the hidden control is sharing the values between server and client.
But sometimes single hidden control will be used for multiple values; it’s not a good way to do because of improper delimited character handling or data type conversions.
I have come up with the solution to maintain the states using a single hidden control and isolate the complication inside this component.
This solution is like an enhancement of ViewState provided by Microsoft. Though it solves the purpose to retain the server side values, it is not possible to manipulate those values in the client side as it’s designed for handling the retaining of server side object.
URL : http://msdn.microsoft.com/en-us/library/system.web.ui.control.viewstate.aspx
ViewState Sample :
public partial class ViewStatePage : System.Web.UI.Page { [Serializable] public class Employee { public string Name; public int Age; } private Employee currentEmployee; protected override void SavePageStateToPersistenceMedium(object state) { ViewState["CurrentEmployee"] = currentEmployee; base.SavePageStateToPersistenceMedium(state); } protected override void OnLoad(EventArgs e) { currentEmployee = ViewState["CurrentEmployee"] as Employee; base.OnLoad(e); }}To solve this problem, I have created a Web Control in my one of old ASP.NET project called as ExtentedViewState Control. Here I have added some more advanced way to handle this problem.
Basically, this control will hold a collection object which will allow the user to add a key value pair. At the time of rendering of this web control, this will generate a single hidden control and holds the key value pairs as base 64 encoded values.
Once the page is loaded into the browser, this control uses a simple Javascript wrapper to allow the user to manipulate the key value pairs from the client side.
When the user submits the page, this Javascript wrapper will send these updated values as base 64 string to the server. In the server side, it will get parsed and object is built on the server side.
Here I have included a sample project in a more simplified way to avoid the hidden controls.
It contains 3 different files for avoiding the hidden controls, from the server side, I have created a simple object to work like ASP.NET ViewState object – named “CustomViewState.cs”
CustomViewState Class contains the implementation of server side key value pair accessing and manipulations. This object will be added as the property to the parent UI.Page class.
User can access the Key value pairs using the property as like the normal collections.
StateManager.js script file serve the same functionality of CustomViewState Class in Client side.
Step 1: Inherit your asp.net page class from FrameWorkBasePage
Step 2: Add your key/values using CustomViewState property of the current UI.Page.
Step 3: Use StateManager object in from client side to manupulate the key value pairs
Drawing Shaped Forms and Windows Controls in GDI+
This article has been excerpted from book “Graphics Programming with GDI+”
Normally, all Windows controls and forms are rectangular, but what if we want to draw them in nonrectangular shapes? We can do this by setting the Region property. The Region property of a form or a control represents that window’s region, which is a collection of pixels within a form or control where the operating system permits drawing; no portion of a form that lies outside of the window region is displayed. To draw nonrectangular shapes, we trick the system into drawing only the region of a control.
Let’s draw a circular form. We can use the GraphicsPath class to draw graphics paths. In this application we’ll create a circular form and a circular picture box, which will display an image. To test this application, we follow these simple steps:
We create a Windows application and add a button and a picture box to the form. Then we set the Text property of the button control to “Exit” and write the following line on the button click event handler:
this.Close();
Next we add a reference to the System.Drawing.Drawing2D namespace that we can use the GraphicsPath class:
using System.Drawing.Drawing2D;
On the form-load event handler, we create a Bitmap object from a file and load the bitmap in the picture box shown in the following code snippet.
Image bmp = Bitmap.FromFile(“aphoto.jpg”;
pictureBox1.Image = bmp;
The last step is to set the form and picture box as circular. We can modify the InitializeComponent method and add code as in Listing 15.5 at the end of the method, or we can add the code on the form-load event handler. We just set the Region property of the form and picture box to the region of our GraphicsPath object.
Setting a form and picture box control as circular
private void Form1_Load(object sender, System.EventArgs e)
{
//Create a rectangle
Rectangle rect = new Rectangle(0, 0, 100, 100);
//Create a graphic path
GraphicsPath path = new GraphicsPath();
//Add an ellipse to the graphics path
path.AddEllipse(rect);
//Set the Region property of the picture box
//by creating a region form the path
pictureBox1.Region = new Region(path);
rect.Height += 200;
rect.Width += 200;
path.Reset();
path.AddEllipse(rect);
this.Region = new Region(path);
//Create an image from a file and
//set the picture box’s Image property
Image bmp = Bitmap.FromFile(“aphoto.jpg”);
pictureBox1.Image = bmp;
}
Drawing a circular form and Windows controls
When we build and run the application; the output will look like Figure 15.3. Because we have eliminated the normal title bar controls, we must implement an Exit button.