Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Visual Basic > Controls

Controls - Page 3

41-60 of 349     Previous     Next
Use XSLT to Create an ASP.NET Page with ASP.NET Server Controls
by Martin Moser
This tip explains how to use XSLT to dynamically create an ASP.NET page containing ASP.NET Server controls.
Create and Execute Web Links with the LinkLabel Control
by Parthasarathy Mandayam
Learn how to easily create makes with the LinkLabel control.
Visual Inheritance with C#
by Boris Eligulashvili
Microsoft VS.NET provides design-time support for form inheritance. A derived form can be added to your solution by right-clicking on your project in the Solution Explorer window and choosing "Add..." and then "Add Inherited Form…" from the context menu.
Deselect All Items in a ListView Control
by Suresh Lale
Use this code to deselect all items in a ListView control.
How to Determine the Item Selected from a Property Grid Drop-down List
by Vladimir Shaposhnik
In Visual Studio, when you select an item on a form you're building, the Property Grid appears and lets you set various properties (e.g. background color, width, height, text color, etc.) from a two-column table. This tip shows how to know which item a user selects from the drop-down list.
Set Two Items of a Property Grid from the Drop-down List
by Vladimir Shaposhnik
The example in this tip demonstrates the technique for setting two items of a property grid from the drop-down list
How to Reference a Control with a String Like a Name
by Armando Antonio Dasilva
GetSelectedRadioButtonValue - Retrieving the value of the selected RadioButton
by Marco Bellinaso
Return the Tag value of the selected RadioButton from the input array of controls. This is useful when you have many radio buttons, with a value associated to each one, and want to select the value of the checked option. Instead of writing something like this: If RadioButton1.Checked Then
GetControlHtml - Retrieving the HTML code generated by the input ASP.NET server control
by Marco Bellinaso
Return the HTML code generated by the input ASP.NET server control Note: the function only works with server side controls that don't generate postbacks and that can be declared outside a server-side form Example: TextBox1.Text = GetControlHtml(DataGrid1)
GetListSelections - Retrieve a comma delimited list of items selected in a List control
by Marco Bellinaso
Return a comma delimited list of items selected in a List control (e.g. ListBox, CheckBoxList) Example: Dim selections As String = GetListSelections(CheckBoxList1)
HasUploadedFile - Return whether a file uploader control has posted a file to the server
by Marco Bellinaso
Return whether a file uploader control has posted a file to the server
Pre-filling a TextBox control with TextMode="Password"
by Marco Bellinaso
When the TextMode property of a TextBox control is set to Password, the value you assign to the Text property (either declaratively or programmatically) isn't actually displayed at runtime, not even in masked mode (with the * chars). This is of course done for security reasons, because even if ...
SetListSelections - Select in a List control the items passed as a comma delimited list
by Marco Bellinaso
Select the specified items (passed as a comma delimited list) in the input List control (e.g. ListBox, CheckBoxList) Example: SetListSelections(CheckBoxList1, "item 3, item 5, item 6")
Enable a key-skipping mechanism for a TextBox
by Marco Bellinaso
Enable the key-skipping mechanism for the input TextBox and for the input chars Example: don't process the 'A', 'b' and '0' chars EnableTextBoxCharSkip(TextBox1, "A"c, "b"c, "0"c)
GetControlsByTag - Find all the controls with the specified Tag value
by Alberto Falossi
Find all the controls with the specified Tag value Example: Dim ctrls() As Control = GetControlsByTag("OK", Me) Dim ctrl As Control For Each ctrl In ctrls Debug.WriteLine(ctrl.Name) Next
GetTextBoxCurrentLine - Determine the current line in a multiline TextBox control
by Marco Bellinaso
Determine the current line in a multiline TextBox control Example: MessageBox.Show(GetTextBoxCurrentLine(TextBox1))
SaveCSV - Saving the content of a FlexGrid control as a CSV-file
by Pebe
Save the content of a FlexGrid control as a CSV-file Example: SaveCSV("C:\Test.csv", MSFlexGrid1)
FindControl - Retrieving a reference to the control with the specified name
by Marco Bellinaso
Return a reference to the control with the specified name, searched into the specified container and its sub-controls Note: it requires the GetAllControls function Example: get a reference to a Label named "lblTest", and set its Text property DirectCast(FindControl("lblTest", Me), Label).
InputBox - A .NET replacement for this VB6 function
by Marco Bellinaso
Create an InputBox like the one of VB6. You can define the dialog's title, question and default value. Example: MessageBox.Show(InputDialog.InputBox("Type your name:", "Test", "Marco"))
InsertImageIntoRtb - Inserting an image into a RichTextBox
by Marco Bellinaso
Insert an image into a RichTextBox, in the current position This version takes in input the target RichTextBox and the path of the image to insert Example: InsertImageIntoRtb(RichTextBox1, "C:\test.jpg")
41-60 of 349     Previous     Next
Sitemap