Forms Data Controls :: Getting News-like Posts Via Database?
Jun 22, 2010
I have a website where people can send an email to a group of people and then choose to have that letter posted on our website.
The problem has now become that I get so many of them, I can't keep up with doing it manually. What I'd like to do is have it go to a database and then have it automatically update the site. So, one page will have "teasers" with the Author's name, etc and a few lines of the letter and then it links to another page that has the entire letter.
I have a site in development with several web services (ASMX) that post important data to my database. When I navigate to the ASMX file in my browser, I can fill in the form with the parameters and post to the DB. If someone finds the URL to my WS, they can severely alter my database. I want to prevent people from being able to post to my WS publicly. So far, I've thought of two things that may but I'd like to know if there are any other ways:
Check to see if the HTTP Referrer to the WS method is the domain the WS is on Add an additional parameter called Key to all important WS methods and have this be an encrypted "password." Then encrypt my stored password on the WS side and compare if the keys match.
I am working on How to display the News Updates on page inside Marquee as hyperlink and on click on the link i have to display the details of the selected News .
which approach i can display the particular section of the page ?
in my asp.net+vb web with access database i iam willing to show a marquee with live data from database.
.aspx code
<marquee behavior="scroll" direction="left"> <div ><asp:Label ID="Label1" runat="server" Text="Label1"></asp:Label></div></marquee> .vb code Dim ConString As String = ConfigurationManager.ConnectionStrings("baijuep").ConnectionString Dim con As New SqlConnection(ConString) Dim CmdString As String = "SELECT KNo, companyto FROM (InOut) where PosnASOn >= now()-2" Dim Adpt As New SqlDataAdapter(CmdString, ConString) Dim KNo As New DataSet() Adpt.Fill(KNo) For Each dr As DataRow In KNo.Tables(0).Rows Label1.Text &= dr("KNo").ToString() + "<br />" Next End Sub
when i use the query (SELECT KNo, companyto FROM (InOut) where PosnASOn >= now()-2)
in query analyser it works fine and the data is displayed but when i use the complete code .vb is not dispying data in to label.
I have developed a news blog in asp.net 4. When I display news using literal control, the news displays without paragraph. However when i use textbox in administrative site to input the news into db--The Textbox takes the paragraph style and displays it. However i don;t want to use Textbox to display my news. Is there any solution to display the news with the paragraph style and so on? The containing component is Datalist and this is my below code.
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?
post - postid(pk), topicid(fk), post (content), createdby, createddate, updatedby, updatedon.
As i told in my last post, I am designing a forums website. I am not able to design the query to retrieve the topics for a category for example say catid=1. I want to display it in a grid view as done in every forums.
I made some query :
SELECT Topic.Sub, Topic.CreatedBy,COUNT(Topic.viewers) from topic where catid=1
group by Topic.Sub,Topic.CreatedBy
This is for retrieving the topic name from the subject and the createdby giving the topic starter and the total no. of views of that topic.
Now i want to make a query from the post table displaying the last post in the topic and if the post does not exist, i want to display the 1st post from the topic table as the last post done.
we have been able to return information from the database and then select the relevant link and return that row of information from the SQL table. The next part I am working on is adding information to the database.
So far all the coding in done in a class file, we are using stored procedures and have used user controls to return the information from the database and then also to select the row of information for each news item from the database. The sql database connection information and executing the stored procedure information is all done in the class file. how to add the news items to the SQL table. Below is the code that is used to return each news item from the SQL Table, how i need to amend this to rather than display the information, save it to the database. Also having used stored procedures, would I need to create another stored procedure to to the INSERT INTO statement
i want to make a add news page that when my user write his news(in up.aspx) then his news shown in news.aspx. what am i going to do ? what is the best way for writing this page ?
I looked for examples for a news ticker and modified one I found to fit my needs. I created a web user control and everything works fine, even with a timer that ticks and refreshes the whole page, but not when I wrap just the user control in an update panel that is controlled by the timer. It works on page load, but then the data disappears on a timer tick. The code behind seems to be running fine and the variables have data etc., so I think it's the javascript, but I'm not sure where to go from here. C# code behind
I am using Javascript to alter the innerHTML attribute of a <td> and I need to get that info back in the form submittal. The <td> corrosponds to an <asp:TableCell> on the server-side, where the Text attribute is set to an initial value.
The user cannot enter the value in this particular field. Instead, its value is set by me (via client-side script) based on actions that the user performs. But this field is useless to me if I can't see its value on the server-side as well.
I'd like to avoid using a read-only textbox, because those are difficult to resize dynamically. Can an <asp:Label> be used as form data? Is there any way to achive this without letting the user manually enter the data? Or is there a simpler way to store a string as a variable somewhere and send it back as form-data?
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#.
one of my client has the requirement of changing the latest news section of website dynamically or runtime so not to publish the site and host it agian and again.this section is in master page how can i achieve this in asp.net c#
I was wondering how to create a front page news function with C# as the language.
Basically I want to be able to use a one of my forums in the category "Site Discussion" called "News" as a way to connect with the front page (homepage) of the site to display a few of the newest news articles each with a title, image, and a short blurb of what the post is about. Also I want them to have a link that connects to the news post in the forums.
***NOTE*** I am using YAF (Yet Another Forum) for my forums.
An example of this from another site is [URL]
As you can see in the above site in the "Today's Top Stories" section it shows 4 news posts (1 main, and 3 other top stories) and if you click on them it links to the news post (which is also accessible via the forums in the news section).
This is basically what I want to incorporate into my site, but using the YAF forums, note an admin console is also needed to do this, I have a serperate admin console that I will set-up for it basically that's when you write it and from there it displays on the front page and in the forums.
i'm currently developing a news system with comments.And i need a way to retrieve an id of the article in a click handle event so i can add new comments to each articleHere is my code-behind right now
Imports System.Data Imports System.Data.SqlClient Partial Class _Default
I am required to develop a page for news updates where user of the website can see the latest news updates with images in hindi. Like some news paper website. [URL] ....
When user click on the read more or on the title of the news complete news will displayed on news on new tab.
when admin of the website update the new it will appear on the page. where recently updated news is display first position.
admin of the website have authority to do following task
1. update the news. 2.edit the news. 3.delete the news
Can i make use of sqlserver for storing the news or xml.
Here's an odd one that I've never seen before. Only on IIS, not in Cassini but in all web browsers I have a button that posts back and the page_load event fires, but the actual button click event doesn't fire. there is no re-writing of the page or anything else happening.