MVC :: What Is The Efficient Way To Display Comment Data

Jan 20, 2010

I am making a blog application and for the sake of my question I have 2 tables: Posts & Comments. I would like to loop through the posts and use a nested loop to display the comments relating to a specific post. Currently, I am using this code:

[Code]....

Obviously this is a simplified version. Is this the most efficient method of displaying this kind of data?

View 3 Replies


Similar Messages:

Web Forms :: Efficient Way For Polling Data To The Server

May 6, 2010

Is there any efficient way for polling data to the server?I have to know if there's an update in the table tblalert. I used the PageMethods and setInterval in javascript to run the method. But the SQL Server having too much stress, lets say 200 users log at the same time... and the set interval is set to 3 secs

View 7 Replies

Forms Data Controls :: Create A Comment Box And Chat For Website?

Jan 12, 2011

want to develop a comment box and chat for my new project.

would love to use some jquery ajax where-ever possble.

want to store commentbox data nto database and retrieve to display them.

no idea about chat whether it should be file or database.

View 3 Replies

Forms Data Controls :: Develop A Comment Section For News Blog?

Jun 5, 2010

I have developed a news blog . I would like to add a Comment section with spam prevention capabilities into my news.My Comment table is as followsComment - CommentID,Name,DateStamp,Comments and NewsItemID as a foreign keyI'm having problem in identifying a logic . I have some questions to ask1) I'm thinking to use Formview to create a comment section?..Is it okey?2) I'm thinking to capture the NewsItemID from querystring and trying to fill up the NewsItemID(foreign key) into comment table?..Can you please show me in coding, How can I do that in coding?...if it is not a good logic,,then advise me how to do this?.3) Getting the comment from formview to db is okey, but how can I show the user comments as soon as he clicked the submit button of the formview ?..It seems quite difficult for me to do handle two events when user click the submit button 1) sending the comment into db ,2) shows the users comment in webpageHow can I do that?..Can you please provide some coding show me how can i achieve my task?

View 4 Replies

Forms Data Controls :: Efficient Way Of Displaying Many Images In Webform

Feb 15, 2011

I am trying to find an efficient way of displaying images (about 140x140px) in a webform. We cannot use paging, so we need to display all these images in the same webform.I noticed that facebook (and other sites) lets you display all your images in one page. For a profile qith about 1000 photos, facebook somehow downloads only enough so that the visitor can see images on the screen. Once you scroll, it seems to only download enough so that the visitor can again see something on screen. It works like a good text editor.... instead of displaying a huge file onscreen (like notepad does) and freezing, it only displays enough for the reader to see.

View 2 Replies

Forms Data Controls :: Formatting Text Within Large Comment Field Stored In SQL Database?

Jun 15, 2010

I'm using ASP .NET C# 3.5. I have a multiline textbox on my web form that allows for the input of up to 5,000 characters from the end-user. This text is a basic description of a training course. I need to display it out in a clearly formatted way. For example, I need there to be bullets and bold text.

What I did was I chose certain (not often used) characters and then used the .Replace method when displaying the text in an <asp:Label>. If the text in the database contains the character '~' then I replace that with a line break <br />. If it contains '`' I replace that with <b> and if it contains '^' I replace that with </b>.

Is there a better way of doing this? It is working properly, and I'm displaying the text properly, but I know the end-user is going to hate typing text like this for formatting. I do want this all to stay database driven as well

View 4 Replies

Want To Buy A Digg-like Comment System For .net?

Feb 4, 2010

I'm looking into integrating a Digg-like comment system into a website with an existing user base.I know there are things out there like Disqus and Intense Debate, that are meant for people to add to their blog, but I want (need) something that I can tightly integrate into my site, with out requiring the user to sign on multiple times.

Basically the only things I came across were 3rd party hosted stuff that really doesn't allow for the kind of integration I need.I'd rather not roll my own ajax/moderated/rankable/threaded comment system, but I don't see any good options out there to avoid doing all that work.The site is asp.net, so I'd really like to have something that is meant to integrate with asp.net.

View 1 Replies

Making A Comment Page?

Sep 6, 2010

i want to make a comment page but i don't know where to start or how to do this. The member of my page must make a comment about videos, articles etc.

View 3 Replies

C# - Most Efficient Way To Get The <title> Of A URL?

May 24, 2010

It's simple to do a webrequest, get the page and parse the html to get the title of the page. But I'm wondering if there is a more efficient way that is faster, and doesn't require downloading the whole html?

View 2 Replies

MVC :: How To Render An HTML Comment In The View

Aug 23, 2010

I have been working in a few MVC HTML Helpers. For example:

[Code]....

If account or url are null should I trhow an exception? Or render an empty string? Or render an Html comment in the view?

View 2 Replies

C# - How To Remove Html Comment Tag Before Render

Jan 18, 2010

i'm using some components. When page render, components generate html comment tags. if i'm using this component 10 times on one page, html comments inserted 10 times.

How to remove html comment tag before render page?

View 3 Replies

MVC :: Color Of Comment Tags In Razor?

Dec 15, 2010

Razor's syntax is superclean, but I hate the yellow color of opening and closing tags in Razor comments. It makes a comment look way too distracting and too much like a tag that is actually to *do* something.

What I'd like instead is the opening and starting tag of comments to be green, just like the the comment itself. This is also the way the classic viewengine syntax highlighting works.

View 8 Replies

Usercontrol, Possible To Have A Design Time Comment?

Jul 4, 2010

Im making a small user control, i was wondering if it was possible to make some sort of comment, that is only visible design time. For example i would like to write in the top of my control that it requires a querystring parameter named userid. This way other developers can quickly see the requirements?

View 2 Replies

Web Forms :: Comment At Particular Place In HTML From C#?

Jul 8, 2010

way to write a comment at particular place in HTML from C#? For example, after a particular label? I can write a comment as follows:

protected void Page_Load(object sender, EventArgs e)
{
Response.Write("<!-- " &#43; ... " -->");
}

but this appears before the DOCTYPE. I'd like to write it at a particular place, or at least in the "body".Thinking about it, I guess I could create a comment label at the beginning of the body and write it there:

Label1.Text = "<!-- " &#43; ... " -->";

Is there a way to make sure it is in the body if I do not have a Label already defined for the purpose.

View 1 Replies

Controls :: How To Check PDF Is Comment Enabled Or Not Using C#

Jun 16, 2015

My only requirement is to find a selected pdf in a folder is Reader enabled or not, more specifically if usage rights are defined in a way that allows people to add annotations (e.g. comments).

I am doing this in windows application. If I click a button, an event is triggered searching a folder for PDF files. This event needs to check whether or not the PDFs in the folder are Reader enabled for comments. If they are, I need to remove the comment usage rights or revert the PDF back to its original version.

My code can only find PDF files in the folder. I don`t know how to check if the selected PDF is comment enabled or not.  

private void button1_Click(object sender, EventArgs e) {
{
string[] filePaths = Directory.GetFiles("D:myfolderpdffolder");
List<ListViewItem> files = new List<ListViewItem>();
foreach (string filePath in filePaths) {
---need to check comment enabled or not---
}
}
}

View 1 Replies

C# - More Efficient Database Access?

Jan 16, 2011

I am new to databases and linq, so my problem may be considered trivial. I currently start all my db requests in each class with:

DataClassesDataContext db = new DataClassesDataContext()


Then I proceed to make whatever linq request I need within the method and carry on with the main application logic.

Now, two interesting queries:

1) I believe I have seen people wrapping db usage within 'using'. Such as:

using (DataClassesDataContext db = new DataClassesDataContext())
{
...
}

If this is correct, then doesn't it mean that my class can't use a member 'db' variable anymore, but rather those db requests need to be made within each function call? Also, what exactly would happen if I don't use 'using' within the calls?

2) Running my app with SQL Profiler enabled, I see lots of connections opening and closing. Does this means that each

DataClassesDataContext call makes a separate connection? It seems inefficient, so is the right way to actually make the DataClassesDataContext object a static within each class being used?

View 2 Replies

How To Provide Ability For Users To Comment On Webpage

May 28, 2010

I need a few options on how I will allow a user to post simple text comments to my website page(s). I will require login to post comments in order to prevent spam posters.

I'm using Visual Web Developer 2010 to design my website. I'm not real familiar with it and do not know if it includes the tool I need to accomplish this task easily.

View 42 Replies

After Posting Comment Automatically Redirect To Blog?

May 10, 2010

I have embedded a Google Blog to my website using iFrame and its working well, now i allow people to post comments anonymously and its working fine, now the problem comes when someone post a comment, after the comment has been posted, this will navigate away from my website and it will only take the user to the blog. How do i prevent that, after the posting it still stay in my site.

View 16 Replies

Create A Threaded / Nested Comment System?

Sep 21, 2010

Anyone know how to create a threaded / nested comment system? I would like to learn how to do this for my blog that I am working on. I simply can't find anything useful out there.

View 3 Replies

Web Forms :: Refresh Facebook Comment Control?

Jun 9, 2010

I have a facebook comment control placed on my aspx page. If the user is not login, the comment control display login button, On clicking the login button a popup windows comesup where user type there user name and password(That is actually through facebook functionality). Now what i want to do is to refresh only the comment box control once the popup is closed.

View 13 Replies

Web Forms :: Send Email On New Posts / Comment?

Jan 26, 2011

i have looked all over the forum but i cant find what im looking for, so here it goes:I need to create some sort of newsletter system that works like ths:User has 3 options (subscribe to):1. all new posts 2. comments on a specific post 3. all comments All i could find on forum and google was a newsletter system that an admin can use to send newsletters, but i need it to be automatically when someone posts a new post/comment. Mostly something like forums.asp.net is using :)Using vs 2005 express / c#.

View 9 Replies

Web Forms :: How To Create A Comment System In Website

Jan 28, 2014

I want to create a comment system for users to comment on my Photos of Photo Galleries and videos in my Website. How i will create it using ASP.Net,C#,SQL Server?

View 1 Replies

VS 2008 What's The Most Efficient Way To Sort A Gridview(vb.net)

Oct 28, 2010

What's the best way to do this? I have seen quite a few examples that use a Dataview etc. what is the best method. I'm thinking about speed issues when a grid has a few thousand records etc.

this is how I populate the gridview:

Code:

[code]....

View 5 Replies

VS 2008 Efficient Listview Sorting?

Jan 29, 2011

I have a requirement where 15 listviews have to be loaded on a web page.But only one shown at a time. Number of columns will be only 2 for each and Number of rows for every listview is very limited.The thing I am not able to decide is the sorting method.1. If I am using the datasource control, it automatically sorts my listview.2. If I am programmatically populating listview , I will have to sort my datatable and rebind to the listview.To use the second method I have to store the datatables in sessions.So taking that into consideration, will datasource control be more efficient ?

View 4 Replies

Most Efficient Endless Loop In C# (carousel)

Jan 19, 2011

Assuming a list of objects, each with an ID, what's the most efficient way of building a carousel, so that each object knows what its previous and next item is. The Last Item's previousId will link to the first item. The first item's previousId will link to the last.

I need the ID of the previous and the ID of the next, as this will be used to populate next and previous buttons on a web page.

I know I could iterate over them, adding placeholders for _next and _prev id, but what's the most efficient way to do this?

I figure my object should look like this:

class Item {
public int Id { get; set; }
public string ItemName { get; set; }
public int Next { get; set; }[code]....

I think I'm looking at this wrong way. Is there a better way of doing this?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved