Click here to Skip to main content
16,005,038 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Time calculation Pin
kirthikirthi6-Oct-06 1:19
kirthikirthi6-Oct-06 1:19 
Questiondisplaying image from database problem !! urgent !!! Pin
vijay25835-Oct-06 17:15
vijay25835-Oct-06 17:15 
AnswerRe: displaying image from database problem !! urgent !!! Pin
Deepak the Cool5-Oct-06 22:08
Deepak the Cool5-Oct-06 22:08 
Question.Net version of PHPMyAdmin ? Pin
digsy_5-Oct-06 16:35
digsy_5-Oct-06 16:35 
AnswerRe: .Net version of PHPMyAdmin ? Pin
Jon Sagara5-Oct-06 19:02
Jon Sagara5-Oct-06 19:02 
AnswerRe: .Net version of PHPMyAdmin ? Pin
Britney S. Morales6-Oct-06 11:17
Britney S. Morales6-Oct-06 11:17 
QuestionHyperLink Field Problem Pin
shapper5-Oct-06 15:51
shapper5-Oct-06 15:51 
AnswerRe: HyperLink Field Problem Pin
shapper6-Oct-06 1:49
shapper6-Oct-06 1:49 
Hello,

Could someone help me out with this?

My QueryStrings are getting all messed up.

I created the GridView at runtime. I am posting my entire code with **** in the code lines which I think are giving me the problem.

Could somebody help me out with this? I tried everything I could think off.



Private Sub gvRSSChannels_Init(ByVal sender As Object, ByVal e As EventArgs) Handles gvRSSChannels.Init

' Define gvRSSChannels properties
With gvRSSChannels
.AutoGenerateColumns = False
.BorderStyle = BorderStyle.None
.DataSource = gvRSSChannels_DataSource()
.GridLines = GridLines.Horizontal
.ShowFooter = False
.ShowHeader = False
End With

' Create, define and add icon template field
Dim tfIcon As New TemplateField
tfIcon.ItemTemplate = New gvRSSChannelsTemplate(Me, ListItemType.Item)
gvRSSChannels.Columns.Add(tfIcon)

' Create, define and add name bound field
Dim bfName As New BoundField
With bfName
.DataField = "Channel"
End With
gvRSSChannels.Columns.Add(bfName)

' Create, define and add url hyperlink field
Dim hfUrl As New HyperLinkField
With hfUrl
.DataTextFormatString = "Me.GetLocalResourceObject(""String.{0}"").ToString()"
.DataNavigateUrlFormatString = "~\RSS.ashx?Channel={0}&Culture=" & System.Threading.Thread.CurrentThread.CurrentCulture.ToString() ' ****
End With
gvRSSChannels.Columns.Add(hfUrl)

End Sub

Private Sub gvRSSChannels_Load(ByVal sender As Object, ByVal e As EventArgs) Handles gvRSSChannels.Load

' Bind GridView to its data source
If Not IsPostBack Then
gvRSSChannels.DataBind()
End If

End Sub

---- Template CLASS ----

' rRSSChannelsTemplate
Public Class gvRSSChannelsTemplate
Implements ITemplate

' Define parent page
Private parent As RSS

' Define template type
Private type As ListItemType

' Create new template
Sub New(ByVal parentPage As RSS, ByVal templateType As ListItemType)

' Define parent page
parent = parentPage

' Define template type
type = templateType

End Sub

' Define template
Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn

' Select template type
Select Case type

Case ListItemType.Header ' Header template

Case ListItemType.Item ' Item template

' Create item template controls
Dim rtrhlIcon As New RssToolkit.RssHyperLink

' Add item template controls handlers
AddHandler rtrhlIcon.DataBinding, AddressOf rtrhlIcon_DataBinding

' Add item template controls to gvRSSChannels
container.Controls.Add(rtrhlIcon)

Case ListItemType.EditItem ' Edit Item template

Case ListItemType.Footer ' Footer template

End Select
End Sub

' rtrhlIcon data binding and properties
Private Sub rtrhlIcon_DataBinding(ByVal sender As Object, ByVal e As System.EventArgs)

' Define rtrhlIcon
Dim rtrhlIcon As RssToolkit.RssHyperLink
rtrhlIcon = CType(sender, RssToolkit.RssHyperLink)

' Define rtrhlIcon container
Dim container As GridViewRow
container = CType(rtrhlIcon.NamingContainer, GridViewRow)

' Define rtrhlIcon properties
With rtrhlIcon
.ChannelName = Me.parent.GetLocalResourceObject("String." & DataBinder.Eval(container.DataItem, "Channel")).ToString() ' ****
.ImageUrl = Me.parent.GetLocalResourceObject("rtrhlIcon.ImageUrl").ToString()
.IncludeUserName = "False"
.NavigateUrl = "~/RSS.ashx?Channel=" & DataBinder.Eval(container.DataItem, "Channel") & _
"&Culture=" & System.Threading.Thread.CurrentThread.CurrentCulture.ToString())
.ToolTip = Me.parent.GetLocalResourceObject("String." & DataBinder.Eval(container.DataItem, "Channel")).ToString() ' ****
End With

End Sub

End Class

Thank You Very Much,
Miguel
QuestionMaintain a dataset across the app, what is the best way? Pin
littlecuttiepie5-Oct-06 12:16
littlecuttiepie5-Oct-06 12:16 
AnswerRe: Maintain a dataset across the app, what is the best way? Pin
Mike Ellison5-Oct-06 14:31
Mike Ellison5-Oct-06 14:31 
AnswerRe: Maintain a dataset across the app, what is the best way? Pin
Britney S. Morales6-Oct-06 11:20
Britney S. Morales6-Oct-06 11:20 
Questionneed help wit files settings pls!! Pin
neodeaths5-Oct-06 12:14
neodeaths5-Oct-06 12:14 
AnswerRe: need help wit files settings pls!! Pin
Mike Ellison5-Oct-06 14:33
Mike Ellison5-Oct-06 14:33 
GeneralRe: need help wit files settings pls!! Pin
neodeaths5-Oct-06 18:11
neodeaths5-Oct-06 18:11 
GeneralRe: need help wit files settings pls!! Pin
Mike Ellison6-Oct-06 6:02
Mike Ellison6-Oct-06 6:02 
GeneralRe: need help wit files settings pls!! Pin
neodeaths6-Oct-06 8:18
neodeaths6-Oct-06 8:18 
GeneralRe: need help wit files settings pls!! Pin
Mike Ellison6-Oct-06 8:40
Mike Ellison6-Oct-06 8:40 
GeneralRe: need help wit files settings pls!! Pin
neodeaths7-Oct-06 3:24
neodeaths7-Oct-06 3:24 
GeneralRe: need help wit files settings pls!! Pin
neodeaths13-Oct-06 17:40
neodeaths13-Oct-06 17:40 
QuestionDataview/Dataset Pin
shivarishxxxx5-Oct-06 10:10
shivarishxxxx5-Oct-06 10:10 
QuestionGet HTML for an element in Page_Load method Pin
eggie55-Oct-06 10:05
eggie55-Oct-06 10:05 
AnswerRe: Get HTML for an element in Page_Load method Pin
eggie55-Oct-06 10:32
eggie55-Oct-06 10:32 
QuestionDataGrid paging problem Pin
saravanan055-Oct-06 8:56
saravanan055-Oct-06 8:56 
AnswerRe: DataGrid paging problem Pin
postmaster@programmingknowledge.com5-Oct-06 23:35
postmaster@programmingknowledge.com5-Oct-06 23:35 
QuestionRegister event attribute onload for the Page from UserControl Pin
Roman Muntyanu5-Oct-06 7:39
Roman Muntyanu5-Oct-06 7:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.