|
Hi friends,
I have to create a Message board. I'm planning to create a class for this, whick is going to include a collection of messages. This is the general idea:
MessageBoard Class
UserId
Collection of Messages
AddMessage()
RemoveMessage(messageID)
MarkAsRead(messageID)
MarkAsUnread(messageID)
Message Class
MessageBoardId
Text
Read
I have read some about Collections I saw some examples where they use ArrayList, SortedList and CollectionBase among others for this. What do you think is the most suitable Collection type to use in this case?
Thanks a lot
|
|
|
|
|
Is there a possibility to include horizontal scroll bar in asp.net 2.0 List box control? though i tried out many possibilities, i couldn't find out..Have got any idea about this? Thanks in advance.
Muthu
|
|
|
|
|
Put the control in a div tag perhaps.
I didn't get any requirements for the signature
|
|
|
|
|
Well, I tried even putting a div element with its scroll property set to auto. Was helpless.!?!
Muthu
|
|
|
|
|
some properties to try setting on your div tag.
style="width:300px; display:block; overflow: scroll; height:200px;"
I didn't get any requirements for the signature
|
|
|
|
|
Instead of div, you can also use a panel control and set the corresponding properties like haight and scrollbars
Alexei Rodriguez
|
|
|
|
|
thanks a lot, that works fine.
Muthu
|
|
|
|
|
I want a js function using confirm js function to determine whether the user wants to exit the current page, by the onunload js event.
That is when user unloads a page, there must be a confimation, whether user really wants to exit.
When i press ok, i must retain the current page. if cancel is clicked then current page must be closed.
any sample piece of code available..Thanks for reading..
Muthu
|
|
|
|
|
See the js function in the post message here at codeproject
If you have something writen and try to go back or toa new page, it asks you if you really want to do that
Alexei Rodriguez
|
|
|
|
|
what is the subject name? i could not find, unless i have some keyword.?!
Muthu
|
|
|
|
|
No, i meant:
Go to "New message" as if you were gonna post a new message and see how it works
You are gonna have to look for that js function,, maybe it is embeded in the html or maybe it is in an external .js file
Alexei Rodriguez
|
|
|
|
|
I am running into an issue with the fileupload control.
Standard code... just a test After clicking on button1 I do get the Yay response. Clicking button1 again right after, I get the Nay response. However, if I choose a file and then click on button1 and it has a file, I get the Yay response and the text in the upload control clears. I refresh the page, and I get the Yay response. Is there a way to control this?
protected void Button1_Click(object sender, EventArgs e)
{
if (this.FileUpload1.HasFile)
{
Response.Write("Yay!");
}
else
Response.Write("Nay!");
}
|
|
|
|
|
That is how the file up load works. The file upload control will post the file only once.
Think about it. If you have a file selected by the user, would you want that file to be sent to the server on every additional postback?
protected void Button1_Click(object sender, EventArgs e)
{
if (this.FileUpload1.HasFile)
{
Response.Write("Yay!");
//Implement method to save file
}
else
Response.Write("Nay!");
}
I didn't get any requirements for the signature
|
|
|
|
|
I understand that's how it should work. And no, I don't want the file to be sent on every postback. Just if you click an upload button with a file in the upload control, and a user clicks refresh on their browser, the same action is performed and the upload control still is showing HasFile = true. I'm trying to not let the code to add a file run again if a browser refresh is performed after clicking upload.
modified on Friday, September 26, 2008 3:32 PM
|
|
|
|
|
Anyone?
Revolutionary: Disk drives go round and round.
|
|
|
|
|
I am looking into loading the content of a usercontrol from a database instead of from a ascx file. I have found some information on ControlParser but I have been unsucessful in getting it to work.
Does anyone have any examples of loading a control in this manner?
Thanks
|
|
|
|
|
Wow. That sounds like a great plan
Are you seriously trying to store code in a database? Why would you do that?
I didn't get any requirements for the signature
|
|
|
|
|
This is only for page template layouts so that I can allow the user to choose from a layout or copy it and edit it themselves.
|
|
|
|
|
|
Interesting.
Seems more complicated than something I would tackle.
I would use css for my styling and allow the user to set some css properties. But that's about as far as I would go.
I didn't get any requirements for the signature
|
|
|
|
|
Hi,
I'm working with Asp.Net 2.0. I want to use Tab or View and MultiView. Initially, View1 should be displayed. If I Click View2, View1 should be gone inside and View2 should be come out. (Like Hide and Show in Menu) How to use this facility in my appn. Please help or I need help for Tab. Thanks in Adv.
Balasubramanian K.
|
|
|
|
|
You don't click on a multiview. It's basically a way to show multiple "views" on one page. You place a multiview on a page, and add views to it. You then program the event that you want to switch views.
If you have tabs, use the click event, and set the active view of the multiview.
|
|
|
|
|
how to display the analytical report from SQL 2005 using dashboard format
|
|
|
|
|
With code?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Can't you just set the current display mode?
System.Web.IDontWantToProgramItMyself.SomeoneElseShouldDoItForMe.Format = System.Web.IDontWantToProgramItMyself.SomeoneElseShouldDoItForMe.Formats.Dashboard
|
|
|
|