Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
🚀 එක පැකේජ් එකයි - මාසෙටම Unlimited Internet! 🌐
sayuru bandara
Updated:
Yesterday at 10:57 AM
🎬 CapCut Pro 1 Month Access! LKR 600
sayuru bandara
Updated:
Yesterday at 10:55 AM
🚀 Google One AI PRO Plan (Gemini Pro Activation) – 18 Months Access! LKR 2200
sayuru bandara
Updated:
Yesterday at 10:53 AM
Canva Pro Lifetime Own Mail Activation LKR 500
sayuru bandara
Updated:
Yesterday at 10:51 AM
Tele marketing executive
nuwandse
Updated:
Monday at 12:27 PM
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
ASP.NET වැඩ්ඩො පොඩ්ඩක් එන්න
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="nuni" data-source="post: 12149472" data-attributes="member: 168835"><p>Something like signup right. </p><p></p><p>Easiest way is create a stored procedure in your SQL database.</p><p></p><p>Ex:- </p><p></p><p>CREATE PROCEDURE WhatEverName @fname VARCHAR (15),@lname VARCHAR (30),@address VARCHAR (80),@telenum CHAR (14),@email VARCHAR (30),@pass VARCHAR (25)</p><p>AS</p><p>BEGIN</p><p></p><p></p><p>WhatEverName = UserRegistration or your preference</p><p></p><p>Then in your registration button click or whatever function you have,</p><p></p><p>Ex:- </p><p></p><p>SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["YourConnectionStringName"].ConnectionString);</p><p></p><p> SqlCommand com = new SqlCommand();</p><p></p><p> com.CommandText = "YourProcedureName"; </p><p> com.CommandType = CommandType.StoredProcedure;</p><p> com.Connection = con;</p><p></p><p></p><p> SqlParameter fname = new SqlParameter("@fname", SqlDbType.VarChar, 15);</p><p> SqlParameter lname = new SqlParameter("@lname", SqlDbType.VarChar, 30);</p><p> </p><p>//Include every table fields like that</p><p></p><p> fname.Direction = ParameterDirection.Input;</p><p> lname.Direction = ParameterDirection.Input;</p><p> </p><p>//Samehere ... Continue like this for your entire table </p><p></p><p></p><p> fname.Value = txtfirstname.Text;</p><p> lname.Value = txtlastname.Text;</p><p> </p><p>//Samehere ... Continue like this for your entire table </p><p></p><p></p><p> com.Parameters.Add(fname);</p><p> com.Parameters.Add(lname);</p><p></p><p>//Samehere ... Continue like this for your entire table </p><p></p><p> con.Open();</p><p></p><p> SqlDataReader dr = com.ExecuteReader();</p><p></p><p>//Then you can close connection <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /></p><p></p><p></p><p>Hope this will help you ... or to get an idea <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /></p><p></p><p>For your webconfig confusion = add your connection string under the connection string TAGs in your webconfig <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" />.</p></blockquote><p></p>
[QUOTE="nuni, post: 12149472, member: 168835"] Something like signup right. Easiest way is create a stored procedure in your SQL database. Ex:- CREATE PROCEDURE WhatEverName @fname VARCHAR (15),@lname VARCHAR (30),@address VARCHAR (80),@telenum CHAR (14),@email VARCHAR (30),@pass VARCHAR (25) AS BEGIN WhatEverName = UserRegistration or your preference Then in your registration button click or whatever function you have, Ex:- SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["YourConnectionStringName"].ConnectionString); SqlCommand com = new SqlCommand(); com.CommandText = "YourProcedureName"; com.CommandType = CommandType.StoredProcedure; com.Connection = con; SqlParameter fname = new SqlParameter("@fname", SqlDbType.VarChar, 15); SqlParameter lname = new SqlParameter("@lname", SqlDbType.VarChar, 30); //Include every table fields like that fname.Direction = ParameterDirection.Input; lname.Direction = ParameterDirection.Input; //Samehere ... Continue like this for your entire table fname.Value = txtfirstname.Text; lname.Value = txtlastname.Text; //Samehere ... Continue like this for your entire table com.Parameters.Add(fname); com.Parameters.Add(lname); //Samehere ... Continue like this for your entire table con.Open(); SqlDataReader dr = com.ExecuteReader(); //Then you can close connection :) Hope this will help you ... or to get an idea :) For your webconfig confusion = add your connection string under the connection string TAGs in your webconfig :). [/QUOTE]
Insert quotes…
Verification
Dawasata paya keeyak thibeda?
Post reply
Top
Bottom