Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Interview Questions
How can we auto size a button to fit its text?
Posted By :
Subhransu Sekhar Jena
Posted Date :
October 30, 2014
The Button control has the AutoSize property, which can be set to true or false. If we set the value of the AutoSize property to true, then the button control automatically alters its size according to the content displayed on it.
You can also find related Interview Question to
How can we auto size a button to fit its text?
Is there a way to set the tab size in the text editor?
Yes, from the standard tool bar select Tools | Options.This will open the Options dialog; select the Text Editor folder, choose a language folder, select Tabs, and set them to your desired setting.
Joycee have developed a website that allows the user to view news of current affairs, entertainment, sports, and weather.
Joycee kept the text style and text size consistent throughout the website. The website will be accessed from mobile phones. While designing the website, Joycee used light green as background color and blue as text color. To make the links identifiable, she underlined the links and the color of the visited links has been set to purple. The website is launched. When the users started using the website, they complained that the links are not identifiable. Identify which of the following strategies should be selected to rectify the problem?
1, Using white as background color will make the links identifiable
2, Using black for background color and blue for visited links will make the links identifiable
3, Removing blue as text color and purple as the color for visited links will make the links identifiable
4, Removing light green as background color will make the links identifiable.
Answer : 3
Does VS.NET support line numbering in its text editor?
Yes, from the standard toolbar select Tools | Options.This will open the Options dialog; select the Text Editor folder, pick the language, and click on the check box for line numbering under the display section.
How to clear a datagrid on a button click?
You need to Clear the DataSource of the dadaGrid.
So try this: dataSet1.Clear();
dataGrid1.DataSource = dataSet1.TableNameHere.DefaultView;
C#: dataGrid1.DataSource = null;
VB: dataGrid1.DataSource = nothing
How to add auto increment column in the DataTable?
To add auto increment column in the DataTable, we can set the AutoIncrement property of the DataColumn object as true and specify the seed value after adding that field into the DataTable object.
// create columns for the DataTable
DataTable dTable = new DataTable();
DataColumn auto = new DataColumn("AutoID", typeof(System.Int32));
// specify it as auto increment field
auto.AutoIncrement = true;
auto.AutoIncrementSeed = 1;
auto.ReadOnly = true;
What's the advantage of using System.Text.StringBuilder over System.String?
StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it's being operated on, a new instance is created.
Which of the following is a fixed length DataType?
CHAR Data type is used when the column lenght is known
When file upload control is used, you can add maximum 4 mb size of the file. Using which property one can extend the limit of file size?
MaxRequestlength Property needs to be set. It takes value in KB. It can support max 2GB file.
How many ways you can display text using Silverlight?
Silverlight supports displaying static pre formatted text that is comprised out of glyph elements and also dynamic text that uses TextBlock. With glyphs, one needs to position the characters individually while TextBlock supports simple layout.
What is the command name to shrink the data file and log file size in SQL server 2005?
The command name is : DBCC SHRINKDATABASE (Database Name)
This command will shrink the data file and log file size. With this command you can specify that how much percentage space you want to free.
dbcc shrinkdatabase (TempDAabase,10)
This command will free only 10% space.
What is the default size of Integer data type in VB.NET as VB.NET has Int 16, Int 32 and Int 64 also?
The default size of Integer data type is 32 bit.
Suppose you want a certain ASP.NET function executed on MouseOver for a certain button. Where do you add an event handler?
Add an OnMouseOver attribute to the button. Example: btnSubmit.Attributes.Add("onmouseover","someClientCodeHere();");
What is the size of the session ID ?
32 bit long integer
How FontSize and Font Size is differ in HTML?
font size is an attribute that we used in font tag.
use in font tag.
Where as font-size is an style property used for controls.
Ex : Font-Size="Small" use for style property For Controls.
Quick Links For Interview Questions Categories:
Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.
So, Start looking our
section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.
Hall of Fame
Terms of Service
Tell A Friend