TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 12-05-2008, 02:04 AM   #1 (permalink)
The Contributor
 
Join Date: Jan 2008
Posts: 87
Thanks: 49
StevenF is on a distinguished road
Default Inserting New Row With ASP.NET?

Hi everyone,

I know this is a PHP forum, but I need to ask an asp.net related question:

I am creating a forum, in asp.net and I have the basics working:
  • Shows the forums from Database
  • When a sub-forum is clicked, the threads related to that forum are shown
  • When you select a thread, it shows the posts in that thread.
  • Login/Register section as well

ASP.NET seems a lot more hassle than PHP just now. I need users to be able to add new topics/posts to the database. In PHP, I would just create a form, and have the details posted into the database using an INSERT query. But, I have no idea how to do this in ASP.NET.

Could anyone shed some light on this for me please?
__________________
My Personal and Photo Blog
StevenF is offline  
Reply With Quote
Old 12-05-2008, 01:13 PM   #2 (permalink)
The Addict
 
CoryMathews's Avatar
 
Join Date: Nov 2007
Location: USA
Posts: 256
Thanks: 7
CoryMathews is on a distinguished road
Default

Create a formview set its default mode to insert, then add a datasouce to it with an insert query how you want it. After that is done for each text box bind it to the field you want it to update.
CoryMathews is offline  
Reply With Quote
Old 12-06-2008, 12:19 AM   #3 (permalink)
The Addict
 
zxt3st's Avatar
 
Join Date: Apr 2008
Posts: 200
Thanks: 18
zxt3st is on a distinguished road
Default

have a try in google.

Inserting New Row With ASP.NET?
__________________
Serenity Project - 5% (Layout) - Ongoing....
Project Serenity Free Life!....
zxt3st is offline  
Reply With Quote
Old 12-06-2008, 12:57 AM   #4 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

This really covers a lot of ground, you are asking us how to handle forms and work with SQL in asp.net. This would probably be covered in tutorials, have you tried google?
__________________

Village Idiot is offline  
Reply With Quote
Old 12-06-2008, 02:17 AM   #5 (permalink)
The Addict
 
zxt3st's Avatar
 
Join Date: Apr 2008
Posts: 200
Thanks: 18
zxt3st is on a distinguished road
Default

Quote:
Originally Posted by t3st View Post
have a try in google.

Inserting New Row With ASP.NET?
Google Search Link Above.
__________________
Serenity Project - 5% (Layout) - Ongoing....
Project Serenity Free Life!....
zxt3st is offline  
Reply With Quote
Old 12-06-2008, 11:41 AM   #6 (permalink)
The Contributor
 
Join Date: Jan 2008
Posts: 87
Thanks: 49
StevenF is on a distinguished road
Default

Thanks for you help guys.

I knew it was form based, but not entirely sure how to do it. I have a seperate blank page, "New Thread" page, which should have a form with Title in it. That data should then be posted into the database.

I'll have a look when I get back from work. Thanks.

PHP is so much easier... :(
__________________
My Personal and Photo Blog
StevenF is offline  
Reply With Quote
Old 12-07-2008, 11:51 PM   #7 (permalink)
The Addict
 
zxt3st's Avatar
 
Join Date: Apr 2008
Posts: 200
Thanks: 18
zxt3st is on a distinguished road
Default

why not try to convert it to php? hehe.
__________________
Serenity Project - 5% (Layout) - Ongoing....
Project Serenity Free Life!....
zxt3st is offline  
Reply With Quote
Old 12-08-2008, 12:21 AM   #8 (permalink)
The Contributor
 
Join Date: Jan 2008
Posts: 87
Thanks: 49
StevenF is on a distinguished road
Default

Hehe, if only.

I've solved this problem, now I have another:

Query With a C# Variable?‏

__________________
My Personal and Photo Blog
StevenF is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP & MySQL Inserting multiple entires from range. Acrylic Absolute Beginners 3 10-02-2008 02:27 AM
PHP compared to other languages... cosmok The Lounge 54 08-20-2008 03:26 AM


All times are GMT. The time now is 06:53 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design