Wednesday, July 15, 2009

How do I use ASP to submit simple form data, and have the server e-mail me with the results.?

I have a form I've built using html but I have little scripting experience. I'm trying to find a simple solution for users to be able to submit form data without using an e-mail client. Then have that sent to a dedicated e-mail address for review.





Any help or links would be appreciated.

How do I use ASP to submit simple form data, and have the server e-mail me with the results.?
You can use a simple asp form With sending email with CDO, and redirect it to any email address. this is a small sample:





http://www.w3schools.com/asp/asp_send_em...





Also if you wish i can make you the form with saving data in access database while you can view the data in administrator section of the site.





IF you need more help Please just msg me.
Reply:A great source for sample code and applications is:


http://www.planet-source-code.com





You have to join to get unlimited daily code downloads (otherwise it's only one per day). Search for what you want under the ASP catagory.


How can i connect SQL database With DSN less connection and with Windows Authentication in ASP?

Integrated security=true; in the connection string, after


server=;datebase=;


Is Cleopatra doing herself in with an asp fictional or is there a historic record?

Here is what I googled.


Mark Antony committed suicide, having been told Cleopatra was dead. According to the doctor Olympus (an eye-witness), he was brought to Cleopatra's tomb and died in her arms. A few days later, on 12 August, Cleopatra also died by snakebite in the breast. The ancient sources generally agree that she had two asps hidden in a fig basket so as she was eating she would never know when she would die.

Is Cleopatra doing herself in with an asp fictional or is there a historic record?
Seriously, when I first read your question I missed the "in" and got all flustered!
Reply:Check out this link:





http://en.wikipedia.org/wiki/Cleopatra





And check out this video from the history channel:





http://www.history.com/media.do?action=c...





Since it was on Searching for the Truth, it may be the best.

song meanings

How can I download Templates from Internet and use it in ASP.net?

I have problems of designing Templates in ASP.net unlike in dream waver.





Additionally, after developing asp.Net how will I generate a file that I will upload, is it all the folder or copy all the aspx file?

How can I download Templates from Internet and use it in ASP.net?
(1) ASP.NET issue -





- For Templates - visit - http://msdn2.microsoft.com/en-us/asp.net...





- Which ASP.NET version are you using? And are you using Visual Web Developer Express or Visual Studio 2005?





If it is ASP.NET 2.0, you can pre-compile your web (read this - http://dotnet.sys-con.com/read/46997.htm... , and then just copy and upload compiled web to the web server.








(2) Timer -





You should be able to locate 'Timer' in 'Components' tab - in toolbox.





Hope this helps.


When i move mouse pointer over link button then a message will higglighted in asp.net, how to do?

when i move the mouse pointer over the link button then a message will highlited in asp.net, how to do?

When i move mouse pointer over link button then a message will higglighted in asp.net, how to do?
Put the desired text to show in mouse hover event of link button.
Reply:use mouseover


How can I make my stand-alone PC simulate an active-server-page (ASP) capable web server?

So I can edit and test-run a website without having to go on-line. Please understand, I'm from the Philippines. Our ISP's are so inutile designing a website here is like digging a cave with a needle.

How can I make my stand-alone PC simulate an active-server-page (ASP) capable web server?
download and install WAMP


http://www.en.wampserver.com/


is a free package that contains ,apache,mysql,php etc


I am creating a website using asp and need advice?

I am adviced by my supervisor to use Asp in java and I am totally confused and fear that needs more than two months to do because I am required to finish this project within two months and I have not done anything further than creating a website in dreamweaver.

I am creating a website using asp and need advice?
hi! i think ASP in java is difficulty to use . so u better use c# or c++ or vb.net in ASP . By this u can comp late your project in a month . if u need any help please be free to contact me .
Reply:The better soluton for your question is go to forums of asp you will get lot of information some ready codes. u have to just pastes those code and need to do some modification in that code

pollen

I am 47 How can I motivate myself to learn web development asp.net?

I don't seems to motivate myself and keep learning. How can I accomplish that? I learn 1 day %26amp; skip several days then I have to come back and relearn what I forgot. I am 47 maybe it is my age? I need to do that , I need an improvement in my finances. Plz let me know what I should do? Or I will stay a loser all my life.

I am 47 How can I motivate myself to learn web development asp.net?
I think trimanga hit it. Microsoft targets the larger corporations who need internet and intranet services.





Most everyone else runs on a Linux box. guncoding the page in php and pulling files from subdomains housed in MySQL.





At least they should be.





Why not, if you want to do backend work, don't you pick up a old P-III and set it up like a web server. There plenty of Linux forums, and the more you ask the more you'll get to know people.





The class idea is great but I'd encourage you to get started on your own and make some mistakes in the meantime.





I'm 58 and have two sites that benefit from that knowledge, but I've decided what makes me happy is working on the content and graphic design.





And that's the key to anything. Do what you love to do, and live in the present. And then give yourself a present - to reminjd you of a particular accomplishment.





Good Luck
Reply:how can we know what motivates you? everybody works differently. Some get motivated by the money, others just enjoy working with computers. If you don't enjoy it, maybe it's better to look for something different.





some people work with a coach to find the best way of motivating them, or to get a clue which job they would like; sometimes, unemployment agencies can help with that, too. but if you're lacking motivation, then maybe programming is not the right thing for you.
Reply:Everyone deserves a fresh start.
Reply:motivation is up to oneself...when you get up each morning you need to say that you will accomplish this today....do this every day until it becomes a habit.... also, work on you self esteem...
Reply:Just think of how people are growing as old as you waiting for your incredibly cumbersome and slothful asp.net pages to partially load and fail to work properly. (Don't worry, it's not your fault, it's the nature of the beast.)
Reply:I recently took Visual Basic .net classes at a local community college.





I don't think I could have learned it online or from a book.





What is your reason for learning ASP.net? After studying VB.net I decided the web runs on Javascript and MySQL.


Does the Armed Forces MCSS™ have the largest selection of ASP® products?

DID WE NOT ANSWER THIS ABOUT 3-4 DAYS AGO--YES--GOV'T CONTRACTING. ONE STOP SHOP.

Does the Armed Forces MCSS™ have the largest selection of ASP® products?
No


What certifications can I get in ASP.NET to get a job in Web Developmet?

Hi,


I am lookng for a web developemnt job.I am mainly good in ASP.NET rather than PHP.So does anyone knows of a certification course in ASP.NET that I could focus on.

What certifications can I get in ASP.NET to get a job in Web Developmet?
Yes.





Microsoft Certified Professional Developer - Web





Check out the exams you need to take to acquire the certification here:


http://www.microsoft.com/learning/mcp/mc...





Hope this helps.


Running PHP and ASP at the same time for a single page?

Is it possible to make a script web page to be interpreted by both PHP and ASP (.Net) one after the other? If so, in what order (PHP must be interpreted first, or ASP must be interpreted first or both is possible)? Is there any practical use for this hybrid interpretation?





Technical answers only, please. Thanks.

Running PHP and ASP at the same time for a single page?
You could do that if you ran the page as ASP.NET and installed an ISAPI library that executed the PHP prior to ASP.NET page execution.





Or, you could possibly create a custom library that interprets the PHP code as its ASP.NET equivalent / converts PHP to ASP.NET objects, etc., then reference that in your ASP.NET assembly via some sort of abstraction, such as a custom control; maybe call it %26lt;asp:PHPInterpreter%26gt; or the like.





It may well be there is some project out there on the Web trying to do just that. Check http://www.sourceforge.net
Reply:oki.. there we go. php runs on apache.. asp does not run on apache ( it does.. but lets say its not for now ) if u have two web servers, u will have to redirect one of them to another port, i see no point in your idea, as its completely useless
Reply:if somehow you are able to configure you apache server to pass requests to IIS then and only thne you can make your page in such way that first you run ASP and then you run PHP.


I am pretty sure it won't work the other way around, but i don't know for certain.


In any case this would be a major pain...


why would you want to do this ???
Reply:You can install and run PHP and ASP on the same machine (and even invoke calls to both within the same page) but it's highly inadvisable.





When a call is made to one technology or the other on a webserver, the website code is passed to the proper interpreter (engine that translates the higher level code to executable machine code). Every time the web server has to switch back and forth, there is a massive cost in resources and latency.





There are only a few exceptions to this, for example one company built an embedded Cold Fusion environment to be run within an ASP.NET environment so that the Cold Fusion code would be supported in CLR (the Common Language Runtime all dotNET applications compile to no matter the language the code was written in).





So, unless you have one of these %26lt;very%26gt; special implementations the general rule is... DON'T.


I have a database with special characters, I wan't to display them on a web page and I'm using ASP, any ideas?

ASP page connected to a mySQL database. The database text fields contain some special symbols, like french and german letters, how can I get ASP to display the characters correctly?

I have a database with special characters, I wan't to display them on a web page and I'm using ASP, any ideas?
Use Server.HTMLEncode("æøå") to encode the string before Response.Write()'ing it :)
Reply:Make a function that checks for special characters and replaces them with HTML friendly equivalents, before you write it out to the page.


Do you need to know visual basic in order to learn ASP?

I am trying to learn server side programming. I am good with JavaScript, HTML, and CSS and want to expand my horizons. Or do I even want to go in this direction at all, would I be in more demand if I learned PHP or Perl or the like?

Do you need to know visual basic in order to learn ASP?
Hello!





No you do not need Visual Basic knowledge to learn ASP.





It does seem to me that PHP programmers are much more in request than ASP programmers, but it may just be my lack of exploration into ASP programming...





ASP has the benefits of being somewhat easier to code/learn (it has an extensive built in framework).





ASP also has the downside of requiring a Windows server, which is more expensive because of licensing fees.





PHP on the other hand is completely free/open source, can run on Linux and Windows servers, and you can basically do anything you want with it...





It is mainly a preference between the two, as each has its own subtle advantages and disadvantages.
Reply:No, you do not need to know VB to use ASP. ASP and VB are completely independant of eachother, although VB can be used in implementing ASP.





ASP / JSP / PHP are all somewhat overlapping technologies. They can all achieve the same results but each has its advantages/disadvantages.





I'd recommend learning all three. For my personal experience, I prefer PHP for it's simplicity and widespread use throughout the internet. (many free PHP scripts are available)
Reply:ASP is the older type of programming, somewhat like many of the current PHP pages. Traditionally, this is written using VB / VBScript languages, but can be written with JavaScript.





PHP would be more demand than ASP. Open Source wins for many people plus it is more platform independent.





If you are in the learning stage, you should focus on ASP.NET rather than ASP assuming you plan to go down the Microsoft path.
Reply:No you dont need VB for ASP. C# helps more in learning ASP but again, its not required. I may be confused too


Actually, for ASP.net, you need C#





For ASP, you dont need anything. Since you know javascript, it may help :)
Reply:You do not need to learn VB for ASP, if you wish to learn asp, i'd recommend Wrox Beginning ASP 4





However i'd prefer you start learning PHP, (with frame work CAKE PHP)...





visit


www.sitepoint.com





and books like Oreilly PHP 4, Wrox Beginning PHP


Why wont my asp network cable work well in my computer it keeps freezing?

I had the same thing i would try if i was you buying a more quilty one becasue some are cheap and low quility.

graphics cards

Is it possible to pass values between a page and the Web User Control in the page in ASP.Net?

The WUC exists in a DataList, and it needs to get an ID var from the datalist for filtering.

Is it possible to pass values between a page and the Web User Control in the page in ASP.Net?
yes you can.





Just declare the id as a property in the WUC. Then you can access it through an object of the WUC.
Reply:You can do what the above user suggested, or even just use a querystring or session variable.


How can i add 35 min in System Time in ASP?

I want to add 35 min in Sysyem time through ASP Now function.What is the way to do this?

How can i add 35 min in System Time in ASP?
DateAdd("n", 35, Now)
Reply:in ASP.NET, this is done with the TimeSpan class.





Dim ts As New TimeSpan(0, 35, 0)


Dim datePlus35 As DateTime = DateTime.Now.Add(ts)


How to set the HTTP header, HTTP_Authorization using ASP?

I am developing a website that allows users to upload and download files using ASP. However, I want to only allow the users to download the files which are uploaded by the corresponding users. So, now, I enable the Basic Authentication to protect the folders that contain the files. However, this needs users to type userid and password twice (one is inside the ASP and the other is the windows authentication dialog box). My ultimate goal is the ASP code can pass the userid and password to the dialog box. I know there should be something to be done with the HTTP_Authorization header. However, I found that I cannot use the response.addheader command to set this. What can I do with this? Many thanks.

How to set the HTTP header, HTTP_Authorization using ASP?
You'd be better off using just forms authentication, rather than trying to mix and match. You are really going to confuse the heck out of your users with the convoluted scheme you are using.





Take the forms authentication you begin with, create a boolean session var called "boolLoggedIn" and set it to true. Boot out any user (via your global.asa) who does not have 'Session("boolLoggedIn") = true'


How to delete a content of a file in ASP?

I want to add a new content in begining of a file. How can i do it.


My idea is reading all the data from a file to a variable and write the new content in to a file and then write the old content from a variable.

How to delete a content of a file in ASP?
I would write the new part to a temp file, then add the old part to it. Then read from the temp and write it all at once into the file.
Reply:Look into the FileSystemObject

botanical garden

Is there an alternative to IIS which can support ASP.NET applications?

I want to create some ASP.NET web services using visual web developer and the book I have says I need IIS to host the webservices. However I only have windows XP home which doesn't included IIS. I don't really want to pay out for a new copy of windows XP Pro so can anyone recommend an alternative to IIS which can support applications written in APS.NET ?

Is there an alternative to IIS which can support ASP.NET applications?
Yes ASP.Net needs IIS to run the web applications. I have 1 solution to run the web applications on Windows XP Home but you have to test it.





1. First of all install Visual Web Developer.





2. Then click on New Web Site in File Menu.


In the New Web Site window, select the location as File System instead of http. Then browse to place your new website at a particular location where you want to save it.





3. Click ok to create the web site.





This will create a new web site. Now press F5 to run the site, it will ask to add the web.config file click ok to proceed. If it runs successfully then you can build web applications on Windows XP Home.





I think this will solve your problem coz Visual Web Developer includes internal Web Server IIS to run web applications.





Gud Luck ;-)
Reply:I seem to remember IIS is part of a service pack somewhere... so should be free... Oh, thats it... Personal Web Server (PWS) should do the same for development purposes, if it is for the "wider world" then look to get IIS, again though, fairly sure it is an option of Windows Server, so should be part of the server OS if that is what you are looking at doing with eventually.





Have only really played with either of them, so there may be essential differences.


How much should I be paying a ASP programmer an hour from India to do work for my website ?

Well it depends on your requirement and the task and also how good the developer is. Usually if the developer is very good, and quick in what he/she does, then they tend to charge a bit more, typically $20-25 an hour. But if the programmer is relatively new, and you want to take chances, then it might go as low as $15 an hour.


Though I recommend going for some small companies, with a proven track in development, even though they charge a bit more than that.

How much should I be paying a ASP programmer an hour from India to do work for my website ?
You can find many freelance programmers at websites like http://oktutorial.com/ , http://www.indianfreelancer.net/ ,etc. Just post your requirements there and let many freelance programmers bid for your project , you may then hire whoever you like.
Reply:Check out http://www.scriptlance.com





Good Luck!


Which DBMS I should choose to work with ASP?

I want to design a website with asp and i was wondering to choose sqlserver2000, 2005 or mysql. And if I choose mysql to work with phpmyadmin, how do I start phpmyadmin. I mean making it work?

Which DBMS I should choose to work with ASP?
If possible, choose SQL Server 2005. Take SQL Server 2000 as next option and MySQL as the last option.





The reason is that there is quite good integration between ASP.NET and SQL Server 2005 especially in caching. You can get data caching to work with SQL Server 2000 too but it is a bit cumbersome.





MySQL is a completely foreign database to ASP.NET and it is best advised to avoid it if you can. Actually, I love MySQL and I use it for most of my work but it doesn't go well with ASP.NET. If you were talking PHP, I would have told you to use MySQL.





Also, if you want to use PHPMyAdmin, you need a webserver with PHP support. Since you are running IIS, you will have to install PHP on that and then extract PHPMyAdmin files in your webserver root or create a virtual directory for PHPMyAdmin. Then you can access PHPMyAdmin by going to http://localhost/virtual_path_to_phpmyad...





Make sure you have PHP installed for this. Also, you should configure PHPMyAdmin with the correct database login.








I strongly recommend against using PHPMyAdmin to manage in this case. Again, don't get me wrong, I use PHPMyAdmin to manage my databases but that's because I primarily develop with PHP. You will unnecessarily have to install PHP to get PHPMyAdmin to work. You can use a windows based GUI to manage MySQL databases too. I have used SQLyog for this and I think it is satisfactory. SQLyog is available at: http://webyog.com/en/
Reply:If you will be hosting the website with a hosted service, then you want to use SQL Server. If you will just be doing it on your local machine, then I'd use MySQL (Free since it's open source.)





to use phpMyAdmin, simply follow directions that came with the install.


How do you navigate with ASP forms?

On the page I am designing, I am going to have the user answer a question, then click "submit." If it is "yes", the next page will have certain questions. If "no", it will display other information on the next page. Also, I need each answer to be recorded on a database.





How would this be set up?

How do you navigate with ASP forms?
Look up Reponse.Redirect, ADO, ASP Forms.

wild flowers

I start a asp project. and when i try to preview it at the browser, an error comes out?

the error are -2147467259 (0x80004005) and the remote procedure calls failed. and did execute

I start a asp project. and when i try to preview it at the browser, an error comes out?
it might be a Registry problem, have you searched Mircosoft Knowlege Base? Try this and I hope it helps;


How to--- display image from access database in Dreamweaver using ASP?

I m trying to display the content of the table in the ASP web page. the entire table is getting displayed except for the image field.





It is a simple Employee database, I want to display information like details of each emp along with their photos.





(AND the images are not being displayed)





Plz Help

How to--- display image from access database in Dreamweaver using ASP?
in order for the image field to work, it would have to be a virtual link to a physical jpg, gif, or other actual image. Most likely, your Access database is taking the image, and converting it to a format similar to uuencode / uudecode, hex 64, or some other similar format. My suggestion would be that you really need to export each image, and then rather than storing the actual image in the database, to store the file location or url for each image in the table.





That would be the only way it would work. You can then have the image display like so:





While not myrec.EOF


Response.Write "%26lt;img src='" %26amp; MyRec("ImageFilePath") %26amp; "'%26gt;"


MyRec.MoveNext


Wend


Is there a book for Classic ASP programmers that will teach how to program using ASP.NET?

I'm an experienced ASP programmer that would like to improve my prospects and I'm looking for a book that will teach me how to program using ASP.NET. Straight to the point instructions with little technical ramblings and explanation will make it easier for me to learn. If you know where I can find a book like this, please leave a reference.

Is there a book for Classic ASP programmers that will teach how to program using ASP.NET?
ASP.NET and ASP are radically different technologies and platforms; as different as PHP is to Ruby on Rails. So rather than trying to find a specific book that is "ASP.NET for ASP Developers", which is about the same as trying to find a book called "Ruby on Rails for PHP Developers" - just get a good book on ASP.NET and learn it from scratch.





If you feel like you need some help with the basics and concepts involved in ASP.NET, but written with technical people in mind, I recommend Wrox's Beginning ASP.NET 2.0 (http://www.amazon.com/Beginning-ASP-NET-... )





If you would rather skip straight to the real development and skirt the basics (or after you've finished Beginning), I recommend Professional ASP.NET 2.0 (http://www.amazon.com/Professional-ASP-N... )





I have more than a dozen Wrox books, most of which are on .NET and they're some of the best purchases I've made.
Reply:There is not upgrade process from ASP to ASP.NET. Just read about ASP.NET





ASP.NET Books I like:


- Professional ASP.NET 2.0 - Wrox


- Beginning ASP.NET 2.0 in C# From novice to Professional (A Press)


- Programming ASP.NET By Dan Hurwitz, Jesse Liberty O'Reilly


Is it possible to recode a web application programmed in asp.net into JSP?

Is it possible to recode a web application programmed in asp.net into JSP? if so, is there a software that helps to recode such application so it could be easier the job of the developer?

Is it possible to recode a web application programmed in asp.net into JSP?
Yes, just don't take it straight across. Look at the strengths of asp.net and those of Java and modify those sections that need to be recoded.





I don't know of any applications to convert asp.net to Java. I'm sure Sun would love that type of software to exist. Have you poked around java.com?

stalk

I have to pass a hide int value whenever i change the value of the dropdownlist in asp.net. How to do?

I have to fill a dropdownlist with two value as (id, value) in asp.net application. That value only fill with dropdownlist. that id should be hide. when i click the value that id has to passed as internally. how to do this?

I have to pass a hide int value whenever i change the value of the dropdownlist in asp.net. How to do?
see the code:





%26lt;input type='hidden' id='hdCombo'%26gt;


%26lt;select id=someCombo onchage='saveChangedValue(this);'%26gt;


%26lt;options%26gt;......


%26lt;/select%26gt;








%26lt;script%26gt;


function SaveChangedValue(ddl)


{


document.getElementById('hdCombo').value = ddl.options[ddl.selectedIndex].value;


}


%26lt;/script%26gt;





and refer the hidden field in server-side code


e.g. in page load event as:





request.form("hdCombo")





if you are using server side combo box,


use in page-load:





srvCombo.attributes.add('onchange', 'saveChangedValue(this);')





here replace srvCombo to your Combo box ID
Reply:If u r filling drop down lits from database u have to bind the dataset to control


1. First set properties of dropdownlist


DataTextField = "ColumnName" this will be visible on webpage


DataValueField=ColumnName" this will be value which is invisible on web page


2. Bind dataset


drpdown.DataSource = dataset;


drpdown.DataBind();


3.Set AutoPostBack propertyof dropdownlist to true


and write what ever u want to werite in dropdown index changed event...


u can get id of the selected value by selectedvalue property...





If u dont understood mail me


with column names ur featching from database.


I will provide code for u...





-----------


Dropdown list has items colletion


and each item will have value and text fields


If u are filling dropdown list manually then give id in value and value in text fileds....


U can get ids by selectedvalue property of dropdownlist


How do i solve this "user session has expired" when running crystal reports on the web and asp?

Iam using crystal reports 8.0 and asp to view reports on our company intranet.Some computer display this error while some computer will show the report correctly.

How do i solve this "user session has expired" when running crystal reports on the web and asp?
When attempting to view a Crystal Report through a web browser, one of the following errors is received:





“User Session Has Expired”





OR





“The oPageEngine object was not created or is not in scope. Please check that the Viewer is referencing rptserver.asp in the correct virtual directory. It is also possible that the ReadRecords method failed. Ensure that you are logging on to the datasource correctly and have provided values for Parameter Fields.”











More Information:





The Active Server Pages require the use of temporary “session” cookies in order to maintain the user state while viewing the Crystal Report. These errors may result if the browser or other software is set to block cookies.











Solution:





Enable cookies in the browser or disable cookie-blocking software.





Go to tools and then internet options, then privacy and advanced. Enable your cookies.


How to connect to Oracle 8i Database using ASP?

I have developed a database using Oracle 8i. I have also developed webpages using Macromedia Dreamweaver. I would like to connect my database to my webpages. I'm considering using ASP. Is this possible? And does anyone have sample codes regarding this? I have searched but have found very little on connecting to Oracle 8i. Thanx in advance :)

How to connect to Oracle 8i Database using ASP?
%26lt;%


if len(Request.form("txtSQL")) %26gt; 0 then


dim cn, rs, i, cString





set cn = Server.CreateObject("ADODB.Connection")


set rs = Server.Createobject("ADODB.Recordset")





cString = "DistribTx=0;Data Source=" %26amp; Request.form("txtDbase") %26amp; ";User ID=" %26amp; Request.form("txtUserID") %26amp; ";Password=" %26amp; Request.form("txtPassword") %26amp; ";"








with cn


.Provider = "ORAOLEDB.Oracle"


.Connectionstring = cString


.open


end with





dim sql


sql = Request.form("txtSQL")


rs.open sql, cn,3,3





if rs.eof = true then


Response.write "No Data in recordset"


else


rs.movefirst


%%26gt;


How to highlight a particular row in a datalist based on some condition in ASP.NET?

I have a datalist bound to a database. I want to highlight the rows of the datalist if the date in the database column is less than today's date in the output. How to go about it?

How to highlight a particular row in a datalist based on some condition in ASP.NET?
Depends how you have your DataList laid out.





I would use the OnItemDataBound event to dictate the background of the item.





Sub dlStuff_onItemDataBound(Sender As Object, E As EventArgs)


Dim dtTarget As DateTime = Now()


If E.Item.ItemType = ListItem.Item Or E.Item.ItemType = ListItem.AlternatingItem Then


Dim dtTemp = Convert.ToDateTime( (CType(E.Item.DataItem, DataRowView) ).Row.ItemArray(1).ToString())





If dtTemp %26lt; dtTarget Then


E.Item.BackColor = "Yellow"


End If


End If


End Sub





%26lt;asp:DataList


id="dlStuff"


runat="server"


BorderColor="black"


CellPadding="5"


CellSpacing="0"


RepeatDirection="Vertical"


RepeatLayout="Table"


RepeatColumns="3"


OnItemDataBound="dtStuff_onItemDataBou...


%26lt;HeaderTemplate%26gt;


List of items


%26lt;/HeaderTemplate%26gt;





%26lt;ItemTemplate%26gt;


Name:






%26lt;%# DataBinder.Eval(Container.DataItem, "Name") %%26gt;






Date:






%26lt;%# DataBinder.Eval(Container.DataItem, "Date", "{0:d}") %%26gt;


%26lt;/ItemTemplate%26gt;


%26lt;/asp:DataList%26gt;
Reply:You should write code in the ItemDataBound event handler of the DataList.





private void dl_ItemDataBound (object sender,


System. Web. UI. WebControls. DataListItemEventArgs e) {


DataRowView drv = (DataRowView) (e.Item. DataItem);


DateTime date = DateTime( drv. Row["DateField"]. ToString() );


if ( date %26lt; 10 ) {


e.Item.BackColor = Color.Red;


}


}





PS~The above code uses the same approach in VB.NET however it contains a mistake. The e.Item.BackColor is of type System.Drawing. Color not System.String. You cannot assign the string "yellow" to it.
Reply:IN the datalist properties look for the style section


In the selectedItemStyle change the back color to your highlight color.





that should get you close...hope it helps

rose garden

Problem in dataformatstring of numbers in a template column of a datagrid in ASP.Net?

I use a template column to display a column of numbers in a datagrid. I have formatted the data using the format string "0:#,#". This is for using comma as thousand separator for numbers. The problem is when the value is equal to zero, it is not displayed but it is left blank. How to display zero values also while using formatting?

Problem in dataformatstring of numbers in a template column of a datagrid in ASP.Net?
Use the format string "0:N0". This is the proper format string for a number with commas separating thousands. The 0 after the N indicates zero decimal places. Please see the source link for other options on formatting numbers.
Reply:is the datagrid directly connected with the database.? or u r using some middle(business) layer to fetch the data and pass it on to the presentation layer..?


How do you end a session in asp classic?

I need the code that ends the session using asp classic.

How do you end a session in asp classic?
Session.Abandon





Or if you just want to blank out a bunch of variables you can do this:





Dim sName


For Each sName In Session.Contents


Session(sName) = ""


Next
Reply:You may want to check this site out. http://www.w3schools.com/


How do I change the name of an uploaded file with asp?

I have a page that allows a user to upload documents to a specified directory. I need to change the name of that file based on a name field (example:JohnDoe.doc). How can I get this done?

How do I change the name of an uploaded file with asp?
Here are two ways to rename files in ASP:








http://classicasp.aspfaq.com/files/direc...
Reply:Use namespace System.IO. The following examples should be on one line (don't break the line).





VB.NET:


File.Move(


"C:\Dir1\SomeFile.txt",


"C:\Dir1\RenamedFileName.txt")





C#:


File.Move(


@"C:\Dir1\SomeFile.txt",


@"C:\Dir1\RenamedFileName.txt")


How can i upload a file in a remote location and display the same in a website using asp script?

You can use ASPUpload component. and ther are a lot of examples of uploading components in http://planet-source-code.com

pink flowers

How do I open asp file in browser saved in wwwroot on same computer i..e. what to type in address bar to open

I activated IIS on computer and copied asp files to wwwroot folder.


Please tell me now how i open it in Internet Explorer 7?

How do I open asp file in browser saved in wwwroot on same computer i..e. what to type in address bar to open
from IIS you can browse to the asp file, right click and choose browse. This will open the chosen file with your default browser.


You check the url for yourself.
Reply:In the browser address bar, type localhost/pagename.asp





If you need more help, contact me at http://www.yuchniuk.com


Running a Webservice online developed through Visual Web Dev. Do I need to find a host with IIS or just ASP?

I want to post a little web service that I made online. Now I made it with Visual Web Developer using ASP and VB.NET. When I post it online what do I have to have installed to run it? For example do I need IIS or just ASP installed, (since the hosting service already has a server installed)?





Thanks,





Brian

Running a Webservice online developed through Visual Web Dev. Do I need to find a host with IIS or just ASP?
You need IIS. ASP is not something that is installed. The ability to process ASP scripts comes with IIS.





Well, there are some linux servers that have intalled an ASP processor called Chili-Soft ASP. But if you developed the code in Visual Web Dev, you are best off with a windows server. If it's .NET (as opposed to classic ASP), make sure the host has .NET framework installed.
Reply:You can get all your Web Hosting realted Answers/Solutions here !


Go here - http://webhostinguide.blogspot.com


--------------------------------------...


My software firewall Commodo blocks the asp.net development server. How do i fix it?

I first get an error when running a web project ASP.net development server failed to start listening to port 2860.


Then i get the message Unable to connect to local host's web server.





How do i allow it to the cassini web server to work with the firewall on.

My software firewall Commodo blocks the asp.net development server. How do i fix it?
Missing some details, so I posted a couple of links to help figure your issue out both links pertaining to same error different ways to fix, hope this fixes it.





http://p2p.wrox.com/topic.asp?TOPIC_ID=4...


http://forums.iis.net/p/1132140/1797712....





What OS?


How to create a Flash form to send email without any knowledge of ASP, PHP or any other programing languages?

How to create a Flash form contains subject, email, and message in Flash 8 that people can click one button to send email? I wanna put the files on Yahoo Geocities or any other free web sites. I don't have a server and I don't know how to do something like ASP or PHP.

How to create a Flash form to send email without any knowledge of ASP, PHP or any other programing languages?
When you boot up Flash, on the banner window, look on the bottom right where it says developer center. Click on it.





You will have to learn what ASP and PHP are...not how to develop applications in. The wizards in Flash are great and easy to follow - BUT do some of the online tutorials and examples.

night garden

How do I connect to a remote Oracle server using Classic ASP?

Can someone give me a connection string to connect to an Oracle server on another server?





I'm coding in classic ASP on a windows server... I can't setup ODBC so I'd like a dsn-less connection.





Act as if, the user ID (schema) in new_apps is "username", with the password "password". The TCP/IP address for new_apps is 114.91.65.12 on port 1521.





Can you help?

How do I connect to a remote Oracle server using Classic ASP?
Your server is going to need a driver for Oracle. That means ODBC or OLE. You need one or the other in order to connect.





Assumung you truly cannot use ODBC, which I doubt, here's an OLE connection string using Data Access Components:





"Provider=MSDAORA;Data Source=114.91.65.12:1521; User ID=userName; Password=userPassword;"





If that doesn't work, you can try this:





Provider=OraOLEDB.Oracle; Data Source=114.91.65.12:1521; User Id=myUsername; Password=myPassword;





And I'd go ahead and try ODBC, since I've never heard of a Web server with OLE but without ODBC:





Driver={Microsoft ODBC Driver for Oracle}; ConnectString=114.91.65.12:1521; Uid=myUsername; Pwd=myPassword;





In all the strings above, you need to remove the spaces following semicolons (;)


How do send a sms to a mobile from an asp.net page?

Hi I am involved in a school management software using asp.net to develop a web site. Here i have to send sms from the asp.net page. any one know how to send sms from a asp.net pages please help me

How do send a sms to a mobile from an asp.net page?
http://www.codeproject.com/aspnet/Sendin...


Alison M. Jaggar believes that modern science needs to elevate emotions to play a prominent role in every asp

Alison M. Jaggar believes that modern science needs to elevate emotions to play a prominent role in every aspect of scientific exploration, though she doesn't provide many concrete examples to examine. Identify one emotion that you believe should be an essential and consistent element in scientific inquiry, and explain [briefly] how this emotion might be better integrated into the process of constructing knowledge

Alison M. Jaggar believes that modern science needs to elevate emotions to play a prominent role in every asp
This is contrary to Science (or at best irrelevant).


Science has its own agenda: explaining the world.
Reply:Confusion... when science is at hand!


How can I develop a db-driven website in ASP.NET without buying db server software?

I'm building a website in ASP.NET VB (not going to change language at this point), and I'd like to interact with either MS SQL server or MySQL. In developing the site, I need to test my code locally before deploying on the internet. How can I achieve this without paying for the same software that will be used by the web hosting server? Can I download MS SQL Server Compact Edition, code to that, then just upload to a site using SQL Server? Or is there some way to develop for free with MySQL?

How can I develop a db-driven website in ASP.NET without buying db server software?
The free database engines from Microsoft are fully compatible with SQL server, the only differences are the supplied tools, the maximum database size and the number of connections.


MySQL is free so you can download and install exactly the same software as used by your web host.
Reply:You can download SQL Server Express edition for free from microsoft. If you have the express edition of visual web developer then I believe that you have it already. In any case you can download it seperately. You can get it at http://msdn2.microsoft.com/en-us/express...

flower bouquet

How do I pass a variable in ASP code and have that variable show up in the URL?

I am programming an .ASP file. I want the person to be able to fill out there first and last name and on the next page they are sent to I want their first and last name to show up in the URL. Can you explain how to do this or recommend a web site?

How do I pass a variable in ASP code and have that variable show up in the URL?
Hi,





You don't need ASP to do this - passing variables in the URL is a standard HTML form function (although you will need ASP, or another server side language, to retrieve those variables).





Use the GET method for the 'method' of your form. The data will be appended to the URL you specify in the 'action' of the form.





EG:





%26lt;form action="processform.asp" method="get"%26gt;


%26lt;input type="text" name="firstname" value="John"%26gt;


%26lt;input type="text" name="lastname" value="Smith"%26gt;


%26lt;input type="submit" value="Submit"%26gt;


%26lt;/form%26gt;





When submitted will land the user at processform.asp?firstname=john%26amp;lastname=...





For your information, the POST method is generally considered a cleaner way to handle forms. You can read more about forms, the GET and POST methods at the w3 schools website - http://www.w3.org/TR/html4/interact/form...
Reply:why not simplify your problems by sending it to a database and then recover it back for the database on the next screen


Does anybody know of a good PERL script to replace text in asp Pages?

I need to change some text in a lot of pages and I don't want to spend the next 10 years doing it manually. Is there an easy PERL script that can do it for me?

Does anybody know of a good PERL script to replace text in asp Pages?
You can try "Actual Search and Replace" http://www.divlocsoft.com/


it allows the use of regular expressions if that's what your after.





Edit Plus also has some nice functions in it's search and replace: http://www.editplus.com/ , you can define sets of characters and change only what's in-between..etc....





Dreamweavers search and replace can't do it for you?

flower delivery

How could I enable user to upload and download file from server using asp.net 2?

How could I enable a user to upload file to the server and then view link to download this file from the server to anthor user i when he enters the site using ASP.NET 2?

How could I enable user to upload and download file from server using asp.net 2?
1. Use the FileUpload control to upload the file.


2. Store the file name in a database table


3. Display datatable to other user.





I'll put up some demo code for this shortly.





UPDATE:





Code link is below.


How to prevent going back to previous page using back button after you logout in asp?

im submitting a form and getting logged out. But after i log out im able to see previous page by clicking back button. I wanted to avoid this and want to redirect him to previous page. How can i do this. Plz tell me the code.

How to prevent going back to previous page using back button after you logout in asp?
You can also add meta tags that will prevent caching, since your browser is displaying a cached page. Check Microsoft instructions for IE at link below:
Reply:If you have classic asp, you can do a "session.abandon()" in the logout page, and they should not see the info if they refresh by going back.





if you have asp.net you can use the built in login/out controls.


How long does it take to become a good asp.net programmer?

I was told that I need to learn some basic C# programming to start ASP.NET. So I am currently learning C# with a LOT of difficulties. Got problems understanding OOP as well as some


(for loop). Should I give up?? I am 49 and was thinking getting into .NET development. What do you guys suggest I should do??

How long does it take to become a good asp.net programmer?
Stick with it. It is very rewarding. But, like many things in life, it is not terribly hard to learn but very difficult to master. With quite a bit of prior programming experience, I felt that I had "learned" .NET in about 6 weeks of working with it. But, I have been using it for almost 6 years (since it was first available) and only in the last year would I even begin to say that I have "mastered" it. I would say I am in the very, very bottom of those who would be considered .NET gurus. So if that helps you get any idea of what kind of effort it requires...





But of course, you do not have to be a guru to do even very impressive, sophisticated things with .NET. It is a very broad platform, and I know many who have made it to "senior developer" level after only having used it for 2 or 3 years. They also had prior programming experience, though.





You mention that you are struggling with OOP concepts. This suggests that you are learning .NET as possibly your first programming language, or at least your first real one. Don't worry about the .NET part - concepts like OOP and for loops apply to (nearly) all programming languages, and you would have to learn them regardless of the specific language you choose. So you are actually learning two things at once - programming theory and .NET/c#. Because of that, give yourself extra time, and take into consideration the fact that you really are learning two subjects at once.
Reply:You can use ASP with either C# or VB. In my opinion VB is a little easier to grasp as it is based upon a beginner language (BASIC)





OOP - Object oriented programming is just a fancy way of grouping related parts of a program together. OOP allows you to structure your code so that is is easier to read, maintain and reuse.





In an OOP program you have Properties, Events and Methods which are grouped together into the following:


Class, Module, Form


.


Properties - describe


Events - indicate something has happened


Methods - do something








A Form is a container for program code with a user interface. ( a Window)


A Module is a container for related code like a form but it has no visible interface


A Class is like a module but has the ability to be copied.





You can think of a Class as cookie dough... With it you can make different types of cookies. A Class object called Cookies is copied and among the different copies some of the properties are changed by the baker.





So with a flavor property you can set it to represent different types of cookies. Chocolate Chip, Peanut Butter, Ginger ect.


The copies are all cookies it is the value of their properties which set them apart.








With our cookie dough you need a method to bake it and we need a property to indicate if it has been baked.





So the Cookie Class will have a method called Bake which will set a property IsBaked to True to indicate that the cookie dough is no longer raw but a finished baked cookie.





This brings us to the topic of Events... Events tell the program something has happened. When an Event happens the section of code related to an event fires and the section of related program code will execute.





To tie this in to our cookie class...


When we baked our cookies we most likely baked a dozen. So we could have aother property called Count. We could have as part of our Bake method some code which adds 12 to the Count.





Now for an Event.... the most likely Event to have with a Cookie Class might be. "Eat A Cookie"





With the "Eat A Cookie" Event we can indicate to the program that something has happend. "Eat A Cookie" will reduce the Count by 1. So Every Time you eat a cookie the count is reduced.





You can make more events to trigger other program functions.


Like when the Cookie count drops to zero fire an Event called "Time To Make More Cookies"


Monday, July 13, 2009

How do i make Active Server Pages (ASP/ASPX) compatible with all browsers?

I mainage a website for my boyscout troop and the Password Protection utility requirers the use of active server pages. The problem is that we can't veiw these pages useing any browser besides IE7.


Any help would be appreciated.


Thanks.

How do i make Active Server Pages (ASP/ASPX) compatible with all browsers?
Did you try the ASP.net for possible solutions?
Reply:This is the problem with using MS specific technologies - lock-in.





Go here for help - http://www.w3schools.com/asp/default.asp





PHP is better.

wholesale flowers

How do I alter the size of the text on my ASP website?

I had a website made and it was written in ASP. The font is quite small and I would like to make it bigger for website visitors to read more easily. How do I amend it so that the font is larger?

How do I alter the size of the text on my ASP website?
First, the font size property is what causes it to appear larger or smaller. Second, you should use a style sheet (css) for things such as font, color, size, and type.





The ASP code probably creates the HTML code dynamically, so you'll have to modify the ASP code (which is just a text file that is interpreted by the application server when the page is requested). It will have HTML code imbedded in it. If it instead loads templates and modifies them, it will be a little more difficult to track down the templates.


How do i make Active Server Pages (ASP/ASPX) compatible with all browsers?

I mainage a website for my boyscout troop and the Password Protection utility requirers the use of active server pages. The problem is that we can't veiw these pages useing any browser besides IE7.


Any help would be appreciated.


Thanks.

How do i make Active Server Pages (ASP/ASPX) compatible with all browsers?
This is the problem with using MS specific technologies - lock-in.





Go here for help - http://www.w3schools.com/asp/default.asp





PHP is better.
Reply:Did you try the ASP.net for possible solutions?


What is the best application for generating asp forms based on database tables?

I am looking for an application to design rich web based forms to capture information through a web browser and append to a db. Something more automated and 'pretty' than designing each form individually in .net.





Many Thanks

What is the best application for generating asp forms based on database tables?
There are a plethora of apps that do this. Try Dreamweaver (adobe.com), IronSpeed Designer - some people have even used MS Access to do this. Frontpage has that functionality built-in.
Reply:Great answer, Cheers Report It



How do I create a PDF Report using ASP?

I'm currently working on a website in which we need various reports generated online. They need to be PDF's, and I'm using a MySQL backend. For our in-house application (Visual Basic) I'm using Crystal Reports, but the Crystal Reports method for generating PDF's online isn't optimal.





What I want to know is, how can I create a dynamic data-driven report in ASP (not .NET) that will display on the users screen as a PDF?

How do I create a PDF Report using ASP?
Jeff,





Don't know if this will help. Try typing in 'Cute PDF' in a search engine to see what comes up. Often times it's a matter of having a simple download. The one I downloaded allows you to convert anything in a PDF format. However, I understand that you are talking about a programming language and not regular documents. You might wanna check it out anyway just to see what comes up.





Steven

state flower

What is the differnces between php and asp?

can they do the same things? i think asp can do more stuff with cookies etc, not sure though, which one is easier to learn

What is the differnces between php and asp?
Generally speaking, PHP and ASP are functionally equivalent. Everything that can be done in one can be done in the other (including cookies). Technical approaches may differ, but the end user most likely wouldn't see a difference.





ASP runs only on Windows and requires IIS (Internet Information Services) to be enabled in order to run.





PHP runs on virtually anything, including Linux, Windows, BSD (and, by extension, MacOS X), AS/400, and pretty much every commercial Unix implementation there is. PHP can work with almost any HTTP server out there, since it can be configured either as a server module or as a CGI/FastCGI executable. On Windows, PHP can be configured to run under either Apache or IIS; the latter allows the developer to develop and test in either PHP or ASP on the same machine.





Both PHP and ASP can integrate with a variety of database engines, either natively or via ODBC (PHP is more likely to integrate natively though).





Generally, PHP is cheaper to host, because it can be deployed on an open-source software stack (Linux/FreeBSD, Apache, MySQL). ASP requires Windows Server and IIS (plus, most hosting companies provide either Access or SQL Server), which brings the cost of hosting up somewhat.





Most people without prior programming experience find PHP easier to learn, because it does not require object-oriented programming and its interfaces to the operating system are based on functions, rather than objects, which makes writing code much easier for a novice programmer.
Reply:php is open source


free source ,free database( mysql)


free forum(phpbb and other)


free e-learning(moodle)





but asp(asp.net now)


you must have visual studio ,sql server








php more easier





asp.net have many wizard to do some tasks without code
Reply:Thousands of dollars.
Reply:Basically, they are just two different kind of programming languages, mostly used for web page design. They both have their attributes but it depends on how you wish to build the site.





"PHP" is generally used by the "linux" users or the people that wish to use free / open source software.





"ASP" is a Microsoft language and will allow the site to more easily communicate with your computer.





LEARNING - Both are about the same, if you learn one you can learn the other with ease. The main difference is in the syntax's and how their used. Both can do alot with cookies but ASP allows for a more interactive system for example "Microsoft Exchange 2003 web-mail system" runs off asp which allows the web-site (thru Internet Explorer) to open up and be used, as if you actually had the "Microsoft Outlook" program opened, this is something that PHP can't do that well.





So in learning, you can learn anyone to start, I am guessing that PHP might be easier, however once you get it you should then be able to pickup the rest (i.e. - Javascript, C, C++, etc.) pretty easy because the concept is pretty much the same.


Dreamweaver 8 Using ASP, How do I preview in browser, or set up a testing server to preview?

In Dreamweaver 8, I have a site that uses ASP. I could preview the site in previous versions without setting up a testing server. I upgraded, to DW8 and now it requires a testing server set up. I set this up with my ftp account, and I could preview, but it also uploaded the files. I simply want to preview my pages locally, then upload them. Any help would be appreciated.


Thanks so much!

Dreamweaver 8 Using ASP, How do I preview in browser, or set up a testing server to preview?
Install IIS. (Internet Information Server). This is a free Microsoft product to allow you to make your personal computer into an ASP server to view your ASP pages before you upload them.





I only know how to do this in XP Professional, but it should be the same for XP home.





Goto Start


Then click on Control Panel


Double click ADD or Remove Programs


Select ADD/Remove Windows Components


Select (IIS) Internet Information Server from the list


Click on Next


Microsoft will then begin to install IIS on your computer.


This is regarding asp programming with database?

I am getting message whenever i want to add new data into the database that either the database or object is not ready to upload new data. I can do the same with sql querry but not through asp. Will someone solve this for me please

This is regarding asp programming with database?
heres some code from a old ASP.NET application I found (the database connection string should be 1 line)





Dim Public DBS as String = "PROVIDER=Microsoft.Jet.OLEDB.


4.0; DATA Source=c:\DataBase.mdb"











Dim myconnection as oleDbConnection = new oleDbconnection(DBS)


myConnection.open()


Dim myCommand as oleDbCommand = New OleDbCommand("Select * from Threads", myConnection)


Dim myDataReader as oleDbDataReader = myCommand.ExecuteReader()


After i have installed asp, what settings do i need to change to enable my asp files to show?

show in interent explorer. they (asp files) are in my wwwroot folder and i have installed asp, but when i preview my site it still doesn't show. is there some sort of settings i have to configure before it works or should it just work after i have installed asp?

After i have installed asp, what settings do i need to change to enable my asp files to show?
If you are talking about classic asp (asp 3.0) then the below link may help you out. ASP.NET is different and I have included a link to that as well.





Enjoy!

song meanings

How can i set a limit for the number of selections in an asp.net listbox control?

i.e suppose there are 10 items in a listbox.


A user can only select a maximum of 3 items only from the list. Is there any property that i can set.

How can i set a limit for the number of selections in an asp.net listbox control?
I would just set the autopost back to true, then check if there are more than three selected. If yes, then deselect the last selection. If that doesn't seem like a good solution, try this:





http://www.learnvisualstudio.net/videos/...





# 3110


I need to count the different type of characters in a string in ASP?

EX:





If I Have (,15,54,34,18,15,34) It needs to give me


15=2


54=1


34=2


18=1


etc.

I need to count the different type of characters in a string in ASP?
There are no hashes in VBScript. Also, it's not enough to split the string, you need to count the items, too. If you don't know what you are talking about, don't answer, please.





Assuming you mean classic ASP with VBScript, the solution is to split the string, then add the items to a dictionary -- VBScript's replacement for hashes -- to get your results.





%26lt;%


Dim strInput = 15,54,34,18,15,34


Dim arrInput = Split(strInput, ",")





Dim objDict = Server.CreateObject( "Scripting.Dictionary" )





Dim Thing


Dim I





'populate dictionary


For Each Thing In arrInput


If Not objDict.Exists(Thing)


objDict.Add Thing, 0


End If


Next





'do counts


For Each Thing In arrInput


objDict.Item(Thing) = objDict.Item(Thing) + 1


Next





'Display results


Dim ItemsArray = objDict.Items


Dim KeysArray = objDict.Keys





For I = LBound(ItemsArray) To UBound(ItemsArray)


Response.Write KeysArray(I) %26amp; ": " %26amp; ItemsArray(I) %26amp; "
"


Next


%%26gt;
Reply:are those characters divided by comma ?
Reply:The best most general solution is to make a hashmap where the value returned from the hashmap for a character is the number of that character you found.
Reply:Use split().


Split(foo,bar) will return an array of all of the substrings in foo divided by bar.


What is the best way to make Database Connection in ASP.NET?

what is the best way to make Database Connection in ASP.NET?





Hello friends m gaurav arya


and I want to know what is the best way to make a connection in ASP.NET?





generally i make a connection at session_start event in global.asax file


and assign it to Session, and use it where ever it is required.


is it correct?


what are the other effective ways to make a connection?

What is the best way to make Database Connection in ASP.NET?
That is not a very good way to make a connection, because then you only have one instance of the connection for each session. What if you need to make asynchronous database calls?





The best way is to use the Enterprise Library's Data Application Block. You can download it from http://msdn2.microsoft.com/en-us/library... - the Enterprise Library is a collection of Microsoft's "recommended best practices" for common programming problems like how to connect to a database. It effectively abstracts the data source from your application. You do like so:





Database myDb = DatabaseFactory.Create("DatabaseName")


myDb.ExecuteQuery(command);





It handles connection opening and closing, pooling, etc. It also keeps the information about the database in an XML configuration file, so it can easily be changed - such as if your SQL Server password needs to be changed - without re-deploying the application.
Reply:Your way of using the connection is not the correct way to do it. The post above me makes a point, but you can keep things simpler without using any extra libraries.





The pattern I advise you to use is as follows (code commented). The code retrieves records, but its just an example. The same pattern can be used for updating or retrieving scalars.





try {





//the using disposes your connection object when done


//


using ( SqlConnection connection = new SqlConnection ( "server=.; uid=sa; pwd=; database=Northwind" ) )


{


//initialize your command object


//


SqlCommand command = new SqlCommand( "SELECT * FROM Employees", connection );


command.CommandType = CommandType.Text;





//open your connection


//


connection.Open();





//get a reference of the reader


SqlDataReader reader = command. ExecuteReader()





//loop through retrieved records


while ( reader.Read() ) {





//read your records here


}


connection.Close(); // close the connection


}


}


catch (Exception ex)


{


//handle your exception exception here (for example log it)


}





Note: The using keyword in C# makes sure that the connection object is disposed





Hope this helps.
Reply:The best way to keep the connection string is web.config with encrypted form.


If you are usingasp.net 1.1 then use web.config because if the connection string changes no need to compile the project again.


What is the best way to learn asp?

I want to learn asp and asp.net.what is the best way learn asp


and what is the best way to develop asp application. What is the best program.

What is the best way to learn asp?
they are all pretty good

pollen

Where can i find a miniproject on an airline reservation system using asp and access?

i have to make a final year miniproject on an airline reservation system using html, asp and javascript for front end and microsoft access as backend. where can i find a ready-made project??

Where can i find a miniproject on an airline reservation system using asp and access?
I think the idea behind this project is to make it yourself.
Reply:If you submit it you will get caught and get a ZERO! So either code it yourself or else you may contact a programmer to help you code your project assignment, check websites like http://getafreelnacer.com/


What is the code in asp for the function to upload a file?

currently i am using vb.net to write a program in asp.net, i need to write a code for upload file. i see a number of ebook but i got no idea at this.

What is the code in asp for the function to upload a file?
in c# you can use this guide http://support.microsoft.com/kb/323246/E...





or if your an visual basic http://www.asp101.com/articles/jacob/scr...





ive used the c# implementation


What are the name spaces that are to be imported while developing ASP.Net applications?

To develop the ASP.Net application what are the namespaces that are to be downloaded in general?

What are the name spaces that are to be imported while developing ASP.Net applications?
The minimum you need to develop a simple page is generally System.Web, System.Web.UI, System.Web.UI.WebControls, and System.Web.UI.HtmlControls. Other common namespaces, that have classes that are used a *lot* are System.Data and System.Configuration.
Reply:That depends completely on what your application does. If your page sends an email you need System.net.Mail, but why import if you don't send mail.


If you're querying a database you might need System.Data.SqlClient, but if you don't hit a Db you won't need that.





So it's application specific.


How do u scramble the code in a project done in VS 2005 after the release of the of ASP.NET project ?

Use an obfuscator...you can't really "scamble" code as it needs to be able to be reverted back to what it was...

How do u scramble the code in a project done in VS 2005 after the release of the of ASP.NET project ?
I believe VS 2005 contains a program called Dotfuscator. It's the obfuscator that Microsoft uses.

playing cards

How to create a dynamic report using a datagrid in ASP.Net?

I want to display a dynamic report using datagrid. i.e ten check boxes will be present in a web page representing column names of a table and based on the selection of these check boxes, corresponding columns should be chosen from an access table and displayed in a datagrid. The selection of check boxes might vary each time but correct number of columns should be displayed in the datagrid dynamically. How to go about it?

How to create a dynamic report using a datagrid in ASP.Net?
First, you will need to use dynamic sql to build your query based on the selected check boxes (columns) because the columns in your select statement will need to be dynamic.





Second, you will need to use the sql statement you create to fill an untyped dataset.





Finally, bind the dataset to your datagrid and make sure that the "autogeneratecolumns" value is set to true.


How can host ASP pages on tomcat?

I have an intranet of my department which we are planning to build in ASP. The server we would given to host it would be a linux box. I want to know if there is any way I can host ASP files on Apache without incurring extra cost (like using some other free web server for linux or putting support for ASP on apache).

How can host ASP pages on tomcat?
You may be in for a rough ride if this site uses any COM+ packages. Enabe mod_perl and install this script in Apache.





http://www.apache-asp.org/
Reply:I believe you cannot use Linux box to run ASP, you may use PHP or JSP/ Servlets in a Linux box, but ASP I'm afraid you cannot. You can ONLY access an ASP created script from a Linux client box, via web server running in Windows, such as IIS or Apache (Windows version).
Reply:no need to put extra cost...assign port number to apache server and perform url mapping , deploy asp files and host.
Reply:Strictly speaking, there may not be an exact solution for what you're asking, but here are some solutions that are close...





Grasshopper - Enables ASP.NET (not ASP Classic) to run as Java servlets on a Java webserver (Tomcat is a Java webserver)


http://dev.mainsoft.com/





ASP.NET on Mono - Although there are some patent intellectual property disputes, as it stands now Mono offers you the chance to run ASP.NET using practically any webserver on Linux.


http://www.mono-project.com/Main_Page





Chilisoft - A special Java server from Sun that will run ASP Classic


http://www.sun.com/software/chilisoft/in...





ASP on Apache - Not sure why you might prefer Tomcat over other public licensed webservers, but Apache is an option this is just one of many solutions


http://www.apache-asp.org/





I'd question your project specs to build using ASP - If that's what you know then fine but if you're building brand new I'd probably recommend a more modern architecture that would perform better like ASP.NET.


How emoticons appear in ASP message boards?

I'm playing about with ASP at the moment and I'm curious to know how, in message boards, how it knows to replace :) or [smile] with an emoticon image?


Are there any tutorials or code snippets explaining how it works?


Cheers!

How emoticons appear in ASP message boards?
Some boards are doing it using JavaScript, (to save server resources); but you could do it using a function like preg_replace ( see http://php.net/preg_replace )








In ASP you would do something like:


%26lt;%


RThis = ("Hey replace my smiley :-)")


RThis = Replace(RThis, ":-)", "%26lt;img src=""Smiley.png""%26gt;")


%%26gt;





%26lt;p%26gt;%26lt;%= RThis %%26gt;%26lt;/p%26gt;








Just replace "Smiley.png" with the smiley you want.


How do I add a new field to an ASP login and save it to SQL?

I have the login working, but I tried to add another field for when a user registers for a login. It doesn't seem like it is saving the new field to the SQL database. Also, how do I call back the information in that field for the logged in user so I can use it on the page?

How do I add a new field to an ASP login and save it to SQL?
hi,


When you try adding another field in a registration script, it doesn't mean you just alter by adding an extra field.





You have to alter the database by adding that field, and you have to tell your program to insert that field into the database. I don't know your script inorder to help you out.





You have to re-edit the insert query to fit your specified inputs (new ones as well).





You have to have some programming experience inorder to do such thing.





To do use that login information, you have to alter your login script and initialize or set a SESSION once the user was verified,





You have to understand the concept of SESSIONS first before continuing.


http://www.sitepoint.com/article/asp-ses...








But here is how you do it...


AFTER you verified that the user has been logged in do this:





response.write Session("username")="the name from database"





NOW to USE it in any page you do this:


you can just print Session("username")





Enjoy.. Good luck on it

graphics cards

How to find out which tables are being used in the database of a web application developed in the ASP.net?

I have access to database but not to the source code of the web applications and i can view and use the application. Now this application has many modules( like A, B, c, And D). If i want to find out which tables are used in C module. How i will be able to do that. I am using MS SQL server 2005. Please tell me the way to do that. Or if any software will be helpful in that.( please mention any freeware)

How to find out which tables are being used in the database of a web application developed in the ASP.net?
You have access to the front-end of an application, you have admin privileges to the databases (but not to the actual script), and you want to know what tables the script uses? Try actually using the application, then see what tables are updated. I must be missing something, because I don't see why you would want to see what tables are being use.


How long does it take to learn ASP?

How long would it take to learn ASP. I fully understand PHP and mySQL already if that helps.


and can you do most things with ASP that you can do with javascript%26gt;?

How long does it take to learn ASP?
It won't take you long if you know PHP. The only difference really is that ASP is a bit more verbose and based on Visual Basic in syntax (vbscript). Also it is used more with SQL server products which will take you a few more days to get a working knowledge.





Since javascript is more of a client (browser) based language and ASP is server-side, they don't act much the same. There is a closer link between ASP and PHP or coldfusion.





I would say it would take you about a week or two to pick up most of ASP if you are into PHP heavily. ASP.NET will probably take you closer to a month since it has some unique things like server-side controls, post back, and code behind techniques.





Hope this helps!
Reply:First, note the difference:





ASP, usually refers to ASP Classic. It can be incorporated using vbscript, and the page development is very similar to php.





ASP.net, is the latest technology, and is different than ASP classic. I requires programming in VB (Visual Basic, not VBScript), or C#, Java, or another compiled programming language.





JavaScript is not the same. JavaScript is usually used client-side, where php and ASP are server-side. ASP.net will write a lot of javascript for you.





ASP.net is more powerful than PHP, but not as simple to code.
Reply:Jump in and do a sample project. If you know VB it will be extremely quick. Knowing PHP gives you the understanding of server side programming which is what ASP is. ASP should not be compared to Javascript. VBscript compares to Javascript. ASP compares to PHP.





For browser compatibility stay with Javascript over VBscript. ASP vs PHP is totally up to you since it is run on the server. Just remember that server OS that runs ASP will cost you money, not so with PHP.





Just have fun








WOW Marty can type fast!


In ASP - How to upload a file to the server from a website?

I cannot use any components,


thx for the help!

In ASP - How to upload a file to the server from a website?
Good luck. No way to do that without a plug in or installed component in ASP.


That's why most web hosting uses PHP instead because it is already including everything you need. Sorry to tell you but ASP sux.
Reply:Not sure if this is a component (windows hosting is really rusty)


but have you looked at:





xupload.aspupload.com





Also, have you discussed with your hosting company about the use of the aspupload.com program? They may allow it.


How do I program an ASP.net page that I have created and designed in dreamweaver?

Note: I am using VS version .Net 1.1 and VB.Net coding. Thanks in advance.

How do I program an ASP.net page that I have created and designed in dreamweaver?
I would use Visual Web Developer Express Edition which is a free download from microsoft....


http://www.microsoft.com/express/vwd/Def...

botanical garden

How do I make a funtion in ASP.NET be called asynchronously?

I have a function that is a bit slow, but no return value is required to complete the page processing in ASP.NET. I figured if I could make the function asynchronous, it would speed up the page loading time for the user greatly.





Thanks!

How do I make a funtion in ASP.NET be called asynchronously?
Use JavaScript(Client Side) or AJAX or ATLAS


How to re-use data returned in recordset using classic ASP?

In classic ASP Is it possible to have one recordset which pulls all data from a table in the database and then create a second recordset on the same page which uses data in the original recordset? I just want a quick fix for right now to get this page working and I will make it better later. I have a need to use ALL data fields in the table in one section of this ASP page and then only SPECIFIC records from the table in another section of the same page.





If anyone can help me with this I really would appreciate it! Thanks guys!

How to re-use data returned in recordset using classic ASP?
I think I am missing something here.





When you retrieve data from a database, that data will continue to be available until the web page is closed or you do another retrieve of data.





If you are selecting multiple rows of data and you want this preserved for later use then either assign the data to variables or assign the data to an array.
Reply:Set rs = cn.Execute("SELECT * FROM Table1")


If Not rs.EOF Then


rs.MoveFirst


While Not rs.EOF


%%26gt;Hello %26lt;%= rs("FirstName").Value %%26gt; %26lt;%= rs("LastName").Value %%26gt;%26lt;%


Set rs2 = cn.Execute("SELECT * FROM Table2")


If Not rs2.EOF Then


rs2.MoveFirst


While Not rs2.EOF


%%26gt;%26lt;%= rs("FirstName").Value %%26gt; %26lt;%= rs("LastName").Value %%26gt;
%26lt;%


%26lt;%= rs2("Address").Value %%26gt;%26lt;%


Wend 'Not rs2.EOF


End If 'Not rs2.EOF


rs.Close


Set rs = Nothing


rs2.Close


Set rs2 = Nothing


How to get the value of Textbox which is created at runtime in asp.net?

In my asp.net page i have created textbox control when i click a button. and then i hve entered some values into that textbox. now i want to get the value of that textbox when i click another one button. Any one pls tell me how to get ?

How to get the value of Textbox which is created at runtime in asp.net?
i use another language , but i think


x=form-name(or page-name).object-name(textbox name).text





then use x in ur program


What do the file extensions RPM & ASP stand for and what do they mean?

I think it has somthing to with Real Player. I know somehow RPM files can connect to ASP files and real player plays the music.





Can anyone explain this to me?

What do the file extensions RPM %26amp; ASP stand for and what do they mean?
ASP stands for Active Server Page. It also stands for application service provider.





Also RPM is a Package Manager originally called the Red-hat Package Manager, is a program for installing, uninstalling, and managing software packages in Linux. RPM was developed on the basis of the Linux Standard Base (LSB). In latter-day usage, the "RPM" portion of this term arises from the fact that .rpm is the default extension for files used by the program.





Here is a website that I pulled this information from.





http://searchwinit.techtarget.com/sDefin...





http://searchopensource.techtarget.com/s...
Reply:You are referring to RMP file extension. (Real Media Player)

wild flowers

How can I pass data from an ASP to a SWF?

Say I had an ASP page that had a SWF movie in it. But, I wanted to pass some random data from a ASP variable to a text box in the movie.





Such as:





%26lt;%


DIM fname


fname = "John"


%%26gt;





How can I pass the contents of 'fname' to the movie?





Hope that make sense, thanks for your help!

How can I pass data from an ASP to a SWF?
The easiest way of passing variables from an ASP file (assuming that it'll churn out HTML as well) is to use FlashVars, which pass variables from an HTML File to a Flash (swf) movie.





A tutorial on using FlashVars can be found below:
Reply:You send the data to the Flash movie as XML or plain text, and you read the value and assign it to the Flash text box with ActionScript.





http://www.adobe.com has tutorials on using ActionScript.