SqlDataSource Versus ADO.NET Coding With C#
Feb 25, 2011
I really do not have time to learn new language, in my case asp.net, but would like to start developing website in asp.net. I do not want to use asp:SqlDataSource control. is it ok if i write in codebehind aspx: all database connections and other CRUD operations in ado.net and c#. I already know xhtml, javascript - jquery, css, xml, json, some knowledge in sever-side coding (before php). want to start coding, instead of learning messy asp.net controls.I have to sit and learn all bloody ways of using those asp.net controls?
View 2 Replies
Similar Messages:
Mar 8, 2011
If I want to connect to a database in ASP.Net, is it better to use ADO.NET rather than SQLDataSource? They serve a similar purpose, correct?
View 7 Replies
Aug 28, 2010
What ive been using now is getting datas in code-behind, passing datasource into a Session, re-binds it to a gridview whenever there's paging/sorting needed. What i want to know is what is better if its performance we are talking about?
Is it datasource into a session Or SqlDataSource for which I know whenever paging/sorting needed is that sqldatasource opens up a DB connection to get the datas again?
View 6 Replies
Jun 29, 2010
I am developing web-app in .NET for 5 months (and enjoying it =)) and I am reading 3 books, all of them teachs at least 2 methods for acessing data: ADO.NET and SqlDataSource object.
I am used to work with ADO.NET method because I feel that even if it needs coding by hand, I can separate the SQL routines from the page and I can customize database routines better.
For now I am using DataReader mode because the application and the database is on the same server and there is only 1Gb RAM available so there is no advantage using DataSet on this moment.
Am I thinking this right? There are some things with SqlDataSource that I don't know how to do it well...
For example:
I have a routine that inserts a record on a table then gets the ID of this record using SCOPE_IDENTITY() function of SQL Server, than it uses this ID to insert another record on another table. Because I use a one-to-many relationship on multiple tables...
How can I work this situation using SqlDataSource object, is it even possible?
View 2 Replies
Sep 16, 2010
What is the difference between; Deploying an application Releasing an application Implementing an application
View 1 Replies
Apr 27, 2010
I manage to change part of it and the rest i not quite sure how to do it. Below is the code written in C#, it is a svc file.
[code]....
View 1 Replies
Jul 23, 2010
I've gone rounds with this ever since I started programming classic ASP 12 (or so) years ago and I've never found a great solution because the architecture of ASP and ASP.NET has always been a swamp of bad practices, magic shared singletons, etc. My biggest issue is with the HttpApplication object with its non-event events (Application_Start, Application_End, etc.).
If you want to do stuff once for the entire lifespan of an HTTP application, Application_Start is the obvious place to do it. Right? Not exactly. Firstly, this is not an event per se, it's a magic naming convention that, when followed, causes the method to be called once per AppDomain created by IIS.
Besides magic naming conventions being a horrible practice, I've started to think it might be a reason there exist no such thing as a Start event on the HttpApplication object. So I've experimented with events that do exist, such as Init. Well, this isn't really an event either, it's an overridable method, which is the next best thing.
It seems that the Init() method is called for every instantiation of an HttpApplication object, which happens a lot more than once per AppDomain. This means that I might as just put my startup logic inside the HttpApplication object's constructor.
Now my question is, why shouldn't I put my startup logic in the constructor? Why does even Init() exist and do I need to care about Application_Start? If I do, can anyone explain why there is no proper event or overridable method for this pseudo-event in the HttpApplication object?
And can anyone explain to me why in a typical ASP.NET application, 8 instances of my HttpApplication are created (which causes the constructor and Init to run just as many times, of course; this can be mitigated with locking and a shared static boolean called initialized) when my application only has a single AppDomain?
View 2 Replies
May 14, 2010
I am trying to tie a sqlDatasource to a Stored Procedure. The stored procedure looks like...
[Code]........
View 2 Replies
May 7, 2010
how can i do perfect coding using all oops concepts?
View 6 Replies
Jul 21, 2010
I Developing a erp project in that there are more than 100 screens i should provide a one button or any other option if users click that button it show all screens so far you have used for eg:alt+tab event if we press it comes so far used same functionality should be overcome in my project how to achieve this.
View 1 Replies
Jun 30, 2010
asp.net 4.0I'm trying to utilize a webservice but is not 100% sure how to do the coding. I've added reference to the web service in the project.The webservice have this class:sendCompletedEventArgs(object[], System.Exception, bool, object) And this delegate:sendCompletedEventHandler(object, sendCompletedEventArgs, System.AsyncCallback, object)This delegate have BeginInvoke(object, sendCompletedEventArgs, System.AsyncCallback, object) and EndInvoke()any suggestions how to utilize this webservice is most welcome?
View 1 Replies
Jul 2, 2010
am displaying various countries names in my dropdownlist and i want to display the data using gridview like whenever i change the country in my ddl it should display the relevant data according to the country?? i have done by using binding data with the datasource without any code but now i want to write the code
View 4 Replies
Feb 19, 2011
I want To send Mail On button click But getting Error Failure sending mail.(smtpException was Catched) public string SendEmail(string strTo_Email_Id, string subject, string strMail_Message)
{
try
{
[code]...
View 2 Replies
May 26, 2010
i would like to run a command prompt to run the project and set its startup project
View 2 Replies
Oct 20, 2010
Why is knowing the Asp.net lifecyle important to coding in Asp.net?
View 10 Replies
Aug 14, 2012
Below is the source code that tries to highlight rows in certain colors depending on value of the certificate. The code runs, but the colors are not showing up.
If e.Row.RowType = DataControlRowType.DataRow Then
If CType(sender, GridView).DataKeys(e.Row.RowIndex).Values("Certificate") <100000 Then
e.Row.BackColor = System.Drawing.Color.lightblue
elseIf CType(sender, GridView).DataKeys(e.Row.RowIndex).Values("Certificate") < 1000000 And ("Certificate") > 100000 Then
[code]....
View 7 Replies
Mar 18, 2010
Is using an include file bad coding practice in asp.net? I am aware of master pages, etc. but it seems like in this case an old fashioned include file works best.I have a home page and I have an "all other" page. The all other page is my master page. I place the header include on the master page and at the top of the home page.
<!--#include file="inc/inc_header.aspx"-->
View 11 Replies
Nov 1, 2010
give me a feedback on the below coding. I like to know whether i had improved in writing the .net coding.
[code]....
View 3 Replies
Apr 15, 2010
I typically don't play with betas, so I am just now getting used to vs 2010 pro. I grabbed it from DreamSpark yesterday, and so far I like all the changes.
I was wondering though, with some of the changes to ado.net EF, is there now a way to set a coding namespace for both the context as well as the entities, instead of just setting the custom tool namespace (this wraps both context and entities)? Typically, I like having my classes grouped into namespaces by type, and since a context isn't an entity, it shouldn't go in the entities namespace. note: I am talking about actual coding namespaces, not the conceptual namepsaces used internally by EF.
I was also wondering if having this (the x86 vs 2010 ide) beside my old one (x64 vs 20080 ide) would pose any problems? It seems to be working ok, I just wanted to make sure I hadn't missed announcements saying I had to de-install one before installing the other.
View 2 Replies
Aug 11, 2010
How to integrate PHP into ASP.net easily. I want to know is there a simple coding process to do this.
View 3 Replies
Feb 17, 2011
I am converting a VB function into c#. I have this in VB: Dim Ret(2)
Whats the best alternative to convert this in c#?
View 4 Replies
Feb 15, 2010
There are three developers who create a web application with ASP.NET using different coding standarts.First developer: Uses class libraries and Web forms without using ASP.NET Web Components or Codebehind pages. (Just like ASP with HTML components, single .asp file etc.)Second developer : Uses ASP.NET Web Components and codebehind pages (all advantages of ASP.NET)Thirth developer: Uses HTML components and just codebehind files with old ASP methods(Request, Respond etc.)Which method of these developers use is more advantageous ?
View 6 Replies
Feb 1, 2011
modules is being used for some sites when they are developing. what is this module. for example, this sites has some modules; membership module,comment module etc.Are modules a diffrent application that is added to site later, or they talk about httpmodules?
also, how can i begin this module design and coding?
View 1 Replies
Jan 3, 2010
I need to design a website for a programming competition event. It will be similar to TOP CODER competitions. User will be given all questions & then user submits the code, that will be running on the server and checks if it gives the correct solution or not. The first one to finish all the questions is the winner.
I've no clue about how to proceed. Assume that languages that are supported are C, C++, Java.
View 2 Replies
Jan 21, 2010
Which is better; using the wizard bind controls or working with ADO.NET objects manually from the performance point of view.
View 1 Replies