Gaurav Taneja

Great dreams... never even get out of the box. It takes an uncommon amount of guts to put your dreams on the line, to hold them up and say, "How good or how bad am I?" That's where courage comes in.

  Home  |   Contact  |   Syndication    |   Login
  90 Posts | 0 Stories | 78 Comments | 7 Trackbacks

News




Google RankGoogle PR™ - Post your Page Rank with MyGooglePageRank.com



The content on this site represents my own personal opinions and thoughts at the time of posting, and does not reflect those of my employer's in any way.

Disclaimer:- All postings in this blog is provided "AS IS" with no warranties, and confers no rights.

Archives

Post Categories

Image Galleries

Atlas

Error

OutLook

SharePointService

Usefull Site Links

Monday, August 04, 2008 #

Looop through the controls...

 

Private

 

SetTooltip(oControl, strToolTip)

FindToolTipControl(oControl.Controls, strToolTip)

 

Sub FindToolTipControl(ByVal oControlCollection As ControlCollection, ByVal strToolTip As String)For Each oControl As Control In oControlCollectionNext

 

......................

 

 

 

Private Sub SetTooltip(ByVal oControl As Control, ByVal strToolTip As String)Select Case oControl.GetType.ToStringCase "System.Web.UI.WebControls.TextBox"

 

Response.Write(

 

Dim otxt As TextBox = oControl.FindControl(oControl.ID)"<br>" & "TextBox:- " & otxt.Text.ToString())Case "System.Web.UI.WebControls.DropDownList"

 

Response.Write(

 

Dim oDdl As DropDownList = oControl.FindControl(oControl.ID)"<br>" & "DropDown :- " & oDdl.Text.ToString())Case "System.Web.UI.WebControls.RadioButton"

 

Response.Write(

 

Dim oRdbtn As RadioButton = oControl.FindControl(oControl.ID)"<br>" & "RadioButton:- " & oRdbtn.Text.ToString())Case "System.Web.UI.WebControls.CheckBox"

 

 

Dim oChkbx As CheckBoxList = oControl.FindControl(oControl.ID)'Response.Write("<br>" & "Ckeckboxloist" & oChkList.Items.Count.ToString())

 

 

Response.Write(

 

Dim MyItem As ListItemFor Each MyItem In oChkbx.Items"<br>" & "Ckeckbox:- " & MyItem.Text.ToString())Next

 

Case "System.Web.UI.WebControls.Label"

 

Response.Write(

 

Dim oLabel As Label = oControl.FindControl(oControl.ID)"<br>" & "Label:- " & oLabel.Text)Case "System.Web.UI.WebControls.CheckBoxList"

 

 

Dim oChkList As CheckBoxList = oControl.FindControl(oControl.ID)'Response.Write("<br>" & "Ckeckboxloist" & oChkList.Items.Count.ToString())

 

 

Response.Write(

 

Dim MyItem As ListItemFor Each MyItem In oChkList.Items"<br>" & "Ckeckboxlist:- " & MyItem.Text.ToString())Next

 

Case "System.Web.UI.HtmlControls.HtmlTableRow"

 

 

Dim oTbrw As HtmlTableRow = oControl.FindControl(oControl.ID)'Response.Write("<br>" & "Table row:- " & oTbrw.InnerText.ToString())

 

End Select

 

End Sub

End Sub
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati