|
Then how do you use this datasource with your repeater control? Do you assign it to the DataSource property of the control and call the DataBind method?
|
|
|
|
|
I have it as Follows:
Private Sub rRSSChannels_Init(ByVal sender As Object, ByVal e As EventArgs) Handles rRSSChannels.Init
' Define rRSSChannels properties
With rRSSChannels
.DataSource = DataSource()
.DataBind()
End With
' Define repeater item template
rRSSChannels.ItemTemplate = New rRSSChannelsTemplate(Me, ListItemType.Item)
End Sub
|
|
|
|
|
I just solved it as follows:
' <Asp:Repeater>
Private Sub rRSSChannels_Init(ByVal sender As Object, ByVal e As EventArgs) Handles rRSSChannels.Init
' Define rRSSChannels properties
With rRSSChannels
.DataSource = rRSSChannels_DataSource()
End With
' Define repeater item template
rRSSChannels.ItemTemplate = New rRSSChannelsTemplate(Me, ListItemType.Item)
End Sub
Private Sub rRSSChannels_Load(ByVal sender As Object, ByVal e As EventArgs) Handles rRSSChannels.Load
' Bind repeater to its data source
If Not IsPostBack Then
rRSSChannels.DataBind()
End If
End Sub
|
|
|
|
|
Hey, i'm trying to keep a list of all the users that are "logged in" to the site at a given time:
every time a user logs in, his username will be added to the list and when he presses the Sign out button his username will be deleted from the list.
the problem is that sometimes the user's session will be closed even if the user doesn't perform a "sign out" (session times out/user closes the browser).
how can i handle those 2 cases if they occour (make sure that the username will be deleted from the list).
in other words,the username should be deleted whenever the user's session close, even if he didnt press the sign out button!???
thanks,
Basheer N.
|
|
|
|
|
Hi,
you can use Session_End event to delete the record from the database.
Sushant Duggal.
|
|
|
|
|
Thx for the suggestion but it's not that simple, i've finally found a way to do it.
when a user signs in , i insert his sessionid and username into a list
when he signs out i delete his info from the online list by name
and when his session times out i delete the info by SessionId
the problem was that if he closes the window the user is still considered online and in case he opens the browser again, a new session will be made, i was trying to prevent two users with the same username logging in simltaniously, so the user had to wait until his previous session timed out even thought noone was using the username at the time, my way to do it , is to keep a cookie on his computer which will allow him to re login if he closes the browser and make a clean sign out:P
if anyone will need any help with somthing like this let me know by email
|
|
|
|
|
Hello,
I need to create a Data Object with fields: Url, Text, Link.
The data object will be used in my VB.NET code.
I want to use this data object to populate a GridView, DataList or Repeater.
I need to have 3 different columns:
- On the first column I need to place a custom control.
- On the second column I need to place a label.
- On the third column I need to place a hyperlink.
Could someone tell me which Data Object should I use?
And which Data Display control should I use?
And I need to do all this in runtime.
Please, send me any links, tips, ...
Thank You Very Much,
Miguel
|
|
|
|
|
This is really two different questions.
1 - you can create your data object with the properties you indicate (Url, Text, Link). You'll then probably want to create a collection class for it... it could be as simple as:
Class MyObjectCollection
Inherits List(of MyObject)
End Class I forget the exact syntax in VB.NET, but hopefully you see what I mean.
2 - to display your custom list, you could use a GridView, a DataList, a Repeater... any of them will work. You'll set its DataSource property to an instance of MyObjectCollection. If you're using a DataList or Repeater, you'll then define the appearance using a template. If you're using a GridView, you might be using TemplateField columns for the data display.
|
|
|
|
|
I have a bit of an odd situation, I have a complex asp.net form that loads in just under 3 seconds in FireFox, Opera and IE 6.
That's not the odd part, the odd part is that after it's visually loaded (I mean all controls rendered, not wait cursor, not activity showing in the browser window anywhere) I can immediately click on and use the controls in FireFox or Opera, but with IE there is a further 10 to 12 second delay after it's visually finished loading where you can't click on anything and the page just doesn't respond.
It's as if IE freezes for 10 seconds after it's done loading the page then unfreezes on it's own.
There is no wait cursor or anything to indicate it's not done fully loading.
Once the form is responsive in all browsers it's just as fast to use (there is some ajax in use etc).
The form has a large number of Telerik asp.net components on it and they are generally speaking very fast and bug free. However this does mean there is a fairly large amount of Javascript behind the form.
Where do I start with something like this to pin down the problem? Any tools I should look into?
Have any of you experienced anything similar with IE versus other browsers?
I know IE 6's javascript engine is slower, but 10-12 seconds versus no measureable time at all has got to indicate something badly out of whack somewhere.
|
|
|
|
|
Hi John. Are you sure it's not just an issue of caching?
|
|
|
|
|
yup, I cleared the cache on all three before testing, they load very fast. It's a mystery.
|
|
|
|
|
A large amount of JavaScript does that to IE, while FF handles it gracefully.
I've created a complex AJAX form and the more javascript events you attach to the controls, the slower it is in IE. It even crashed everytime I close IE after opening the application
The only way you can fix this is preferably to separate the form into several pages, or reduce the events attached (especially to the textboxes and similar controls).
"A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson
"Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin
Edbert
Sydney, Australia
|
|
|
|
|
Hi All,
I got a chance to view your explanation for the _DoPostBack function. However, can this function return any values back to the client side and then can submit the form.
My scenario is like,
I am using frames. In one of my frame there are user inputs for the user name & password. So when the user enters the details & clicks the submit button on the parent page, the user credentials should be authenticated & then submitted. So I am eager to know whether _DoPostBack method can return any values.
Please suggest me how can I achieve the scenario.
Thanks in Advance,
Malli
|
|
|
|
|
It doesn't have to. When the form is posted, the contents of the fields are sent in the form data.
---
b { font-weight: normal; }
|
|
|
|
|
Hi Guffa,
Thanks for the reply.
The user details for authentcation will be in on one of my frames. But the submit button will be on the parent page. So after the user enters the details in the Iframes, after authenticating the user the form should submit.
Can you please send me any sample code for achieving the same if possible.
Thanks,
Malli
|
|
|
|
|
What do you mean by authentication, then? Isn't the server doing the authentication?
If you want to get the data from the fields of the form in the page in the iframe, you access them something like this:
var username = doucment.getElementById('IdOfTheIframe').document.getElementId('IdOfTheField').value;
---
b { font-weight: normal; }
|
|
|
|
|
User wants to change the content of web page.
They are all non technical guys and they have least knowledge of HTML to begin with.
We need a page that exactly works like microsoft word for them so that they do not take a pain of knowing html syntax while editing the content.
Problem with using word and saving it as html creates a lot of junk tags like meta tags etc., which we do not want to use it.
Any idea on how to tackle this type of scenario ?
|
|
|
|
|
I've found this component works well for what you describe in all major browsers:
"r.a.d.editor is the leading WYSIWYG rich-text editor for ASP.NET. It can replace any TextBox with an intuitive Word®-like editor, which enables even non-technical users to visually manage HTML content."
http://www.telerik.com/products/aspnet/controls/editor/overview.aspx[^]
|
|
|
|
|
I have an image in an item template on a datagrid (asp.net & vb.net).
I want to hide the image dependent on the value in another column.
How can I do that ?
|
|
|
|
|
You can simply use the data binding expression to set the Visible property of the image, and in the expression you can populate the value of the Visible property based on other columns, some thing looks like ... Visible="<%# ... %>"... .
|
|
|
|
|
How do you create a web browser plugin?
|
|
|
|
|
Visit the home page of the browser developer for which you wish to create a plugin. Click on the appropriate links to navigate to their documentation for creating a plugin for their browser.
|
|
|
|
|
I'm having an issue with my datagrid. My grid is dynamically populated via my Sql Server database and each grid row contains a ButtonColumn with an imagebutton. If my page remains idle for more than 5-10 minutes after populating the grid (i.e. if I don't perform some type of action on the page such as clicking a button on the grid), then the entire grid loses its data. It simply goes blank.
One thing I noticed is if I click on a button on the page after this 5-10 minute period, the page never even accesses the button onClick event in the code behind. It simply accesses the Page_Load event and that's it.
Anyone know why this may be occurring?
Thanks.
-goalie35
|
|
|
|
|
I think your session got killed.
Either try to set a longer timeout for the session or you may have something that killed the session (I believe there are several reasons why a session could terminate quicker than the normal time).
"A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson
"Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin
Edbert
Sydney, Australia
|
|
|
|
|
Hello All
Can u pls help regarding viewstate..........
I'm using user contol for some code. Also using viewstate on form1.aspx(e.g.). User control is placed on this form. I need to access form viewstate value on usercotrol. is it possible?
is viewstate written on FORM available on User Control?
Pls help me in this regard.
Balasaheb
Software Developer
|
|
|
|