Can some one tell me what will be the code in vb.net?
Printable View
Can some one tell me what will be the code in vb.net?
Something close to this:
Code:Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports FISDesktop.Framework
Namespace BindRptrToDictTestWebCS
Public Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not IsPostBack Then
Dim ClientFields As FISDesktopSerializableDictionary(Of String, String) = ew
FISDesktopSerializableDictionary(Of String, String)()
ClientFields.Add("Custom Property 1", "FieldValue1")
ClientFields.Add("Custom Property 2", "")
Repeater1.DataSource = ClientFields
Repeater1.DataBind()
End If
End Sub
Protected Sub Repeater1_ItemDataBound(ByVal source As Object, ByVal e As RepeaterItemEventArgs)
Dim lblLabelName As Label = DirectCast(e.Item.FindControl("LabelName"), Label)
Dim lblFieldValue As Label = DirectCast(e.Item.FindControl("FieldValue"), Label)
lblLabelName.Text = DirectCast(e.Item.DataItem, System.Collections.Generic.KeyValuePair(Of String, String)).Key
lblFieldValue.Text = DirectCast(e.Item.DataItem, System.Collections.Generic.KeyValuePair(Of String, String)).Value
End Sub
End Class
End Namespace
[QUOTE=FourBlades]Something close to this:
The code for what?
I can only assume that one of these is true:
1) The OP edited the original post to remove the actual question.
or
2) FourBlades is some kind of psychic.
Sometimes I do surprise myself, but not to that extent.
The original post was edited.
I think this is some sort of Forum Posting test?
If so there is a whole area on this forum for you to go there and test postings to see how they all work.