Advertisement
Advertisement
| 02.05.2008 at 04:44PM PST, ID: 23139971 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: |
Snippet # 1
========================================
<ItemTemplate>
<table>
<tfoot>
<tr>
<td colspan=6 nowrap=nowrap style="color:DarkRed;font-size:small;background-color:#fffff4;border:solid 1px Red; text-align:center;">
<asp:Label
ID = "lblErrorMessage"
runat = "server"
EnableViewState = "False"
Text = "Label"
Visible = "False"
>
</asp:Label>
</td>
</tr>
</tfoot>
</table>
</ItemTemplate>
</asp:TemplateField>
========================================
Snippet # 2
========================================
Sub LinkBtn_SVK_Click(ByVal sender As Object, ByVal e As CommandEventArgs)
Dim objLabel As Label = Nothing
Dim strErrMsg As String = String.Empty
Dim objGV As GridView = CType(FindControl("GridViewBrowseMemberProfiles"), GridView)
If objGV IsNot Nothing Then
Dim objGVRows As GridViewRowCollection = objGV.Rows
For Each objRow As GridViewRow In objGVRows
objLabel = CType(FindControl("lblErrorMessage"), Label)
If objLabel IsNot Nothing Then
strErrMsg = "Hello world"
With objLabel
.Text = strErrMsg
.Visible = True
End With
Else
MsgBox("objLabel is Nothing")
End If
Next
Else
MsgBox("objGV is Nothing")
End If
objLabel = Nothing
End Sub
====================================
|