QnA   »   Yahoo   »   asp.net

  • 2008-02-21 09:01:13
    well i want retrieve data from sql to my . net page.. i have a set a combo box.. where all user name have to be stored . one selecting any name all other values should be displayed.. i wrote this coding but i get error. SqlConnection con = new SqlConnection("Data Source=ORG-99DBE221248;Initial Catalog=pubs;Integrated Security=True"); String sName = "select * from feedback where uname='" + cuname.Text + "'"; email.Text = email ; sites.Text = site ; pro.Text= pro ; cm.Text = cm ; qa.Text = aq; sug.Text = Sug ; Qlike.Text = Qlike ; dislike.Text = dislike ; SqlCommand cmd = new SqlCommand(sName,con); con.Open(); SqlDataReader dr = cmd.ExecuteReader(); Error are shown where i assign text box and sql value... can anybody rectify this error plz. i use c# language
    Preferred Answer: Try this code. And dont use String concat operations. using( SqlConnection connection = new SqlConnection("Data Source=ORG-99DBE221248;Initial Catalog=pubs;Integrated Security=True") ) { SqlCommand command = new SqlCommand("SELECT * FROM feedback WHERE ( UNAME = @UNAME )"); command.Parameters.Add("@UNAME", SqlDbTypes.Text) = cuname.Text; SqlDataReader reader = null; try { connection.Open(); reader = command.ExecuteReader(); if ( reader.HasRows ) { while ( reader.Read() ) { email.Text = reader.GetString( database table field index like 0 ); if email columns first column in the table then you must use 0 for first column email.Text = reader.GetString(0); sites.Text = reader.GetString(1); } reader.Close(); } connection.Close(); reader.Dispose(); } catch ( SqlException ex ) { // Handle errors } // End Try } / / End U"sing
  • 2009-12-20 22:34:48
    I have created an asp.net application using VS Studio 2005 and used the Crystal reports available in VS 2005. I need to know the License fee for Crystal reports for using the same application on a public online website?
    Preferred Answer: http://www.recrystallize.com/merchant/crystal-reports/buy-crystal-reports.htm
  • 2009-05-13 19:21:02
    I have Microsoft IIS and I have written a simple ASP.NET application that should allow a user to create a file on my server. I have allowed the Internet User permission to write to my wwwroot folder, but the application still won't work, it throws an exception saying that access to the path is denied. What else can I do to allow my visitors to create files? Thanks.
    Preferred Answer: Any time you see the access to path denied error, that's usually because you have not properly granted permission to the folder for the process that is actually running ASP.NET. This is often the NETWORK SERVICE account, NOT the ASPNET worker account (WS 2003 and later). It is also possible that you are either not changing the name of the file being written, or you are not closing it and destroying the file object before someone else creates it. Only one user at a time can have a file open.
  • 2010-02-25 15:47:47
    I have an asp.net machine account, I have forgotten the password. Now, I cannot update my pc and right now I do not have the money to see a computer specialist. How can I get rid of it without knowing the password?
    Preferred Answer: Go to http://peterkellner.net/2007/02/15/resetpasswordaspnet/ and follow the directions.
  • 2009-09-06 23:07:05
    I want to make a multilingual website in asp.net.Send me some good link. Plz tell me the process of making other languages resource files without knowing the particular language.
    Preferred Answer: Well, someone will have to understand the language. The general idea is this: each item displayed on the screen is identified by an ID. Each user has a locale. You then use that ID and locale to retrieve the text for the screen in the user's language. Someone has to translate each of those pieces of text for every language. Good luck.
  • 2009-01-17 16:42:53
    I am uploading the files exactly as they are on my computer and it works on my computer. I'm new to ASP.NET but I'm not really sure what I'm doing. I am using 1&1 which I know for a fact supports ASP.NET because that is the default page they had for me and I read through their services before buying. Any idea why it won't work when on the www?
    Preferred Answer: Do you have the right version of the framework? Is everything registered? Do you have the right impersonation? There are a lot of reasons it might not run.
  • 2008-05-01 08:55:55
    I am planning to learn either php or asp.net. Now I don't know which one I should start with ? I am planning to study & build real projects for myself during 6 months then look for a job. I only know some html. So should I go for asp.net or php? Thanks.
    Preferred Answer: I'd say go for php because (a) you are less drawn in to microsoft style of hugely long inflexible naming schemes [while this may be useful in large long term maintenance its a pain in the butt for learning] (b) the help / lookup function etc on php.net is supoib and will get you actually achieving things more quickly.
  • 2009-05-01 23:54:06
    I want to design a web page in asp.net(visual stud. 2008) by using microsoft express, But i dont have any idea, so please help me out
    Preferred Answer: do you have an actual question, or do you just want someone to move the mouse for you?
  • 2009-07-31 01:30:36
    Is it possible to pass an object from a Web Service to an ASP.NET application?
    Preferred Answer: Yes
  • 2009-03-12 19:53:08
    Hi, I have done IT but still I m bit confused about vb.net(asp.net) programming...I know there are so many jobs in vb.net with asp.net. and that is the reason i want to learn them in a minimal time. Can anyone suggest me a book or books that provide more examples or some other better way?
    Preferred Answer: Microsoft has some video tutorials (free) on their web site. Taking college classes (community colleges) is also a good way to learn.


  Related Tags
SOURCES
» Yedda
Follow on Twitter

© Copyright 2009 Gingersoft Media