Click here to Skip to main content
16,006,845 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Saving my menus Pin
2hdass21-Aug-07 3:36
2hdass21-Aug-07 3:36 
QuestionSharing multimedia files over IIS Pin
juli Paris20-Aug-07 8:22
juli Paris20-Aug-07 8:22 
AnswerRe: Sharing multimedia files over IIS Pin
Rama Krishna Vavilala20-Aug-07 11:17
Rama Krishna Vavilala20-Aug-07 11:17 
QuestionRe: Sharing multimedia files over IIS Pin
juli Paris21-Aug-07 0:19
juli Paris21-Aug-07 0:19 
QuestionAdd menu like winApplication Menu.... Pin
mostafa_h20-Aug-07 8:06
mostafa_h20-Aug-07 8:06 
QuestionSql Server 2005 required? Pin
Richard Jones20-Aug-07 7:57
Richard Jones20-Aug-07 7:57 
Questionglobal database connection Pin
PaulaM20-Aug-07 5:47
PaulaM20-Aug-07 5:47 
AnswerRe: global database connection Pin
Eduard Keilholz20-Aug-07 6:01
Eduard Keilholz20-Aug-07 6:01 
No, we can't! This is because according to the n-tier architecture you website shouln't be able to gain access the database. Therefore you will need to create a business 'layer' or business project which will return your data.

In the business layer you gain access to your database and return an object to your website...

Example :

<br />
public class Clients : IDisposable<br />
{<br />
<br />
   private SqlConnection _Connection = null;<br />
<br />
   public Clients()<br />
   {<br />
      _Connection = new SqlConnection("ConnectionString") // ConnectionString is a setting ofcourse!<br />
   }<br />
<br />
   public DataTable GetAllClients()<br />
   {<br />
       // Code to return all your clients<br />
   }<br />
<br />
   public DataRow GetClient(int ClientID)<br />
   {<br />
       // Code to return a single client<br />
   }<br />
<br />
   public int CreateClient(string Name)<br />
   {<br />
       // Code to create a client<br />
   }<br />
<br />
   public bool UpdateClient(int ClientID, string Newname)<br />
   {<br />
      // Code to update your client<br />
   }<br />
<br />
   public bool RemoveClient(int ClientId)<br />
   {<br />
      // Code to remove the client<br />
   }<br />
<br />
   public void Dispose()<br />
   {<br />
      if (_Connection != null)<br />
         _Connection.Dispose();<br />
      _Connection = null;<br />
   }<br />
}<br />
<br />


This would make your web-app very neat, and you don't have to worry about the database connection anymore :->



.: I love it when a plan comes together :.
http://www.zonderpunt.nl

QuestionPassing VB variables to Javascript code Pin
beish120-Aug-07 5:00
beish120-Aug-07 5:00 
AnswerRe: Passing VB variables to Javascript code Pin
peacefulmember20-Aug-07 6:06
peacefulmember20-Aug-07 6:06 
GeneralRe: Passing VB variables to Javascript code Pin
beish120-Aug-07 6:44
beish120-Aug-07 6:44 
GeneralRe: Passing VB variables to Javascript code Pin
peacefulmember20-Aug-07 6:57
peacefulmember20-Aug-07 6:57 
GeneralRe: Passing VB variables to Javascript code Pin
beish120-Aug-07 12:59
beish120-Aug-07 12:59 
AnswerRe: Passing VB variables to Javascript code Pin
Michael Sync20-Aug-07 7:09
Michael Sync20-Aug-07 7:09 
GeneralRe: Passing VB variables to Javascript code Pin
beish120-Aug-07 13:01
beish120-Aug-07 13:01 
AnswerRe: Passing VB variables to Javascript code Pin
Rama Krishna Vavilala20-Aug-07 7:16
Rama Krishna Vavilala20-Aug-07 7:16 
GeneralRe: Passing VB variables to Javascript code Pin
beish120-Aug-07 13:02
beish120-Aug-07 13:02 
AnswerRe: Passing VB variables to Javascript code Pin
Christian Graus20-Aug-07 10:56
protectorChristian Graus20-Aug-07 10:56 
GeneralRe: Passing VB variables to Javascript code Pin
Guffa20-Aug-07 10:58
Guffa20-Aug-07 10:58 
GeneralRe: Passing VB variables to Javascript code Pin
beish120-Aug-07 13:00
beish120-Aug-07 13:00 
AnswerRe: Passing VB variables to Javascript code Pin
Guffa20-Aug-07 22:43
Guffa20-Aug-07 22:43 
QuestionHow to call 2 javascript function on Page Laod Pin
Sandeep Akhare20-Aug-07 4:39
Sandeep Akhare20-Aug-07 4:39 
AnswerRe: How to call 2 javascript function on Page Laod Pin
Talal Sultan20-Aug-07 5:02
Talal Sultan20-Aug-07 5:02 
AnswerRe: How to call 2 javascript function on Page Laod Pin
Guffa20-Aug-07 11:10
Guffa20-Aug-07 11:10 
GeneralRe: How to call 2 javascript function on Page Laod Pin
Sandeep Akhare20-Aug-07 19:23
Sandeep Akhare20-Aug-07 19:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.