VB.Net Versus C Sharp
Aug 18, 2010which is the better language in terms of coding, proficieny if we compare between VB.Net and C Sharp.
View 7 Replieswhich is the better language in terms of coding, proficieny if we compare between VB.Net and C Sharp.
View 7 RepliesWhat is the difference between; Deploying an application Releasing an application Implementing an application
View 1 RepliesI'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?
What does the underscore mean in C Sharp?
I saw a program,
Csharp Code:
Class Metals {string _metalType;public Metals(string type){_metalType = type;Console.WriteLine("Metal: " + _metalType);}}
What does the _ (underscore) mean in it?
Does that mean any static variable or something else?
I am unable to show message using msgbox.show method in c sharp which we can use in Vb.net.
How to implement such thing in c sharp
What is partial class in c sharp and whats the use of it, how to implement the partial class
View 6 RepliesMy project is completely built on asp.net with codebehind vb.net, is it possible to add a class library .cs file to my project. since it is based on c sharp will i be able to add it.
View 2 RepliesHow to generate a sequence like the follwoing
AAA
AAB
AAC
.
.
.
ZZZ
I want to store it in a database as a column.
I am new to asp.net c sharp; right now I am working on one project, in that I need to send the [short message service] to mobiles, I don't how to send the message to mobile. Please someone help me, give some ideas or some links where I can find the sample code or sample projects
View 6 Repliesgive me any pointers for free tutorial on RADGRID or give me a simple example on how to create a RADGRID and bind it to data source.
View 2 RepliesI want to select data from SqlDataSource tag to gridview using TextBox1 value.how can i modify that ASP.net code behind file..
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
SelectCommand= "select distinct [Species],[qty],[received],[Discard],[mortility],[dispatch],[dispatch],[dpt_sales] from [vw_getFishDtls] where [Tank_id]=TextBox1.Text and [ftype] =(select [ftype] from [vw_getFishType] where [Tank_id]=TextBox1.Text"
ConnectionString="Data Source=IT-ISHAN;Initial Catalog=ETF;User Id=ishanuk77; Password=ishanuk77;">
</asp:SqlDataSource>
i am writing a simple C# application with sql as my database however i am confused how to connect to my database the details are the following:
Server = "BFO-PC3\BFOPC3SQL2000";
Username = "aesadmin";
Password = "adminpw";
Database = "M4200";
i have extracted data from database..currently that information is in a string variable...my point is to pass that string value into a gridview in the application..i have already created the gridview with checkbox list fitted into it...on inserting the values will the gridview will expand dynamically ??..if no then what to do ? how to push the data into gridview so that it expands dynamically?
View 1 Replieshow to write functions and methods in c sharp?Is it not possible to write function in c sharp if not if i want return some value then how should i execute this
View 6 RepliesHow to convert list to dataset using c sharp?
View 2 RepliesI have a MVC project where NHibernate + SharpArch are being used for data persistance across the project. The properties class for the database are created then I have my repositories bringing back data using LINQ. However, for some recent queries I have done I am getting the following error;
[Code]....
There is no column in my database with name PaymentRefundFkFk so what maybe causing this and how do I resolve this issue?????
I am looking to learn .NET , i have experience in some Html, Php and mysql . What i mainly need to know is where to start.-I am guessing i would use Microsoft visual studio for development , and design of my pages.-If i wanted to make a site that ran a compiled program for instance, what would be the best langauges to learn alongside .NET c-sharp ?-Is it mysql compatible? Just looking for the best place to start.
View 2 RepliesIn my website I have two files home.aspx and tab.aspx with code behind files home.aspx.cs and tab.aspx.cs. I have a table variable in tab.aspx.cs which needs to be sent to home.aspx.cs when I click a button on home.aspx.
View 1 Repliesi'm using Asp.net MVC with Sharp Architecture.
I have this code:
return _repositoryKeyWord.FindAll(x => x.Category.Id == idCAtegory)
.Take(50).ToList();
How can i order by random?
Note: i don't want to order the 50 extracted items, i want order before and then extract 50 items.
m building a web-page in that theres a tag which holds some documentary data, so i want to print that specific data and not the whole page i.e banner, textfeilds etc... since i know window.print() function prints the whole page, but how to print a sepicific area in a page.
View 2 Replieshow can we create Passing Arrays to Methods inc sharp
View 4 RepliesI am trying to get my head around the sharp architecture and used the visual studio template as described on the web:[URL] This is all cool. Unfortunately, I cannot add a strongly typed view as easily as I am used to 'under' asp.net mvc.
What can I do to 'enable' this in VS 2008 Prof? I have also installed asp.net mvc 2.0 and would like to reflect this in my 'vs studio sharp environment'.
I am writing the code for contactus module for DNN. But i ma unable to recived the mai. what i m missing in the code.
SmtpClient smtpClient = new SmtpClient();
MailMessage mailMsg = new MailMessage();
MailAddress fromAddress = new MailAddress("friendemail@mail.com", "friend");
smtpClient.Host = "abc.mail.com";
//smtpClient.Port = 587;
smtpClient.Port = 25;
mailMsg.From = fromAddress;
mailMsg.To.Add(myaddress@mail.com");
mailMsg.Subject = "test message";
mailMsg.IsBodyHtml = false;
mailMsg.Body = "hello friend";
try
{
smtpClient.Send(mailMsg);
}
catch (Exception ex)
{
// lblstatus = "sending fail" + ex.Message;
}
When I am building my typing tutor application the errors user made I want to show it in RED into his textbox. I created a LIST to have the index values stored but cannot figure it out how to retieve it and make them display as RED COLOR in UserTexbox.
[Code]....
The error that I get from this code states that the cast is invalid and that the number must be less than infinity. [Code]....
By the way, I tried to paste my code using the icon from the toolbar but it didn't work. Firefox problem maybe?