|
|
Hi All,
I created a contact list that has the following items:
FirstName, LastName, PhoneNumber, Email, Comments using Text Var.
Gender (M, F) is combo box. When i clicked Submit, the Text Var fields sent to the MS Access database via ASP OK however, the Gender which is the combo box item does not send anything. Can someone please help me to define a combo box that will allow the item to be sent? Can someone please help to make sure I defined the Gender component and .ASP (Gender part) correctly? Thanks for your help.
Gender Component: Labels [Male, Female}
onClipEvent(data) {
function GenderDisplay (){
Gender_result = Gender.getSelectedItem().label;
selectedItem = Gender.getSelectedIndex();
}
}
Below is my .ASP file as well. Thanks for your help.
<%
FirstName = Request.Form("wFirstName")
LastName = Request.Form("wLastName")
PhoneNumber = Request.Form("wPhoneNumber")
Email = Request.Form("wEmail")
Gender = Request.Form("Gender")
Comments = Request.Form("wComments")
set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=dsntemp & "DBQ=" & server.mappath("AddContacts.mdb")
conn.Open DSNtemp
set RS = Server.CreateObject("ADODB.Recordset")
'response.Write Firstname & " - " & Lastname & " " & PhoneNumber & " " & Email & " " & Gender & " " & Comments
'response.End
'FirstName = "true"
'LastName = "true"
'PhoneNumber = "true"
'Email = "true"
'Gender = "true"
'Comments = "true"
SQLstmt = "INSERT INTO Contacts (FirstName,LastName,PhoneNumber,Email,Gender,Comments)"
SQLstmt = SQLstmt & " VALUES ("
SQLstmt = SQLstmt & "'" & FirstName & "',"
SQLstmt = SQLstmt & "'" & LastName & "',"
SQLstmt = SQLstmt & "'" & PhoneNumber & "',"
SQLstmt = SQLstmt & "'" & Email & "',"
SQLstmt = SQLstmt & "'" & Gender & "',"
SQLstmt = SQLstmt & "'" & Comments & "'"
SQLstmt = SQLstmt & ")"
'response.Write SQLstmt
'response.End
RS.Open SQLstmt,conn
Conn.Close
set conn = nothing
set RS = Nothing
response.write("Record is registrated. Please close this windows")
%>
|
|
|
|
|
Hello,
I am trying to determine what my options are for creating a browser plugin. I have no experience in this area, and am hoping someone can point me in the right direction. Here are a few specific questions:
1. Does one of the popular browsers stand out as easier than the others for creating plugins?
2. What are the right technologies to use? I've been googling for an hour and have found references to XUL, ECMAscript, and various toolkits. I was kinda expecting that you could write a plugin for IE in C++ (or C#?) or for FireFox using Java... but I haven't found any information on this.
Here's the basic problem: I need to write a simple desktop application that can communicate with the browser. I figured writing a simple plugin to facilitate the communication would be the way to go.
Thoughts?
Thanks!
Ian
|
|
|
|
|
Mundo Cani wrote: 1. Does one of the popular browsers stand out as easier than the others for creating plugins?
Actually, it is based on your expertise. If you are very good in VC++ and COM then creating the addon for IE might be easier for you.. But if your background is from web development, Firefox addon might be more easier to be created..
Firefox Addon (extension) can be created by using XUL, Javascript, CSS and xpCOM. So, it's pretty easier for web developers to create an extension for Firefox.. If you wanna try to create, you can read this post "8 Steps to create your owned Firefox Extension". It's just 8 steps to create the firefox addon.. If you want more information about this, you can read http://developer.mozilla.org/en/docs/Extensions
If you wanna create the addon for Internet explorer, you have some experiences in using VC++ or COM..
The article below is nice and it includes all links related creating IE addon..
http://www.codeproject.com/useritems/Issuewithbandobjects.asp
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Thanks for your reply. Sorry I didn't respond... I rely on my email for post responses and I guess that's not working.
Thanks for the great links! I'll check 'em out!
Ian
|
|
|
|
|
Hi Guys,
I have a problem with my Search page. When I am searching for some value it will display all the records, but then, when I clicked one of the records on the gridview, it will redirect to the other page.
The problem is that, when clicking the back button of the internet browser it will go back to the first page where it came from. But the problem is that the gridview is clear, which is it shouldn't be.
Is there a way to preserve the content of the first page, so that when we click on the 'Back' or 'Previous' button the result should be remained there.
How should I do it?
hifiger2004
|
|
|
|
|
hifiger2004 wrote: Is there a way to preserve the content of the first page, so that when we click on the 'Back' or 'Previous' button the result should be remained there.
No.
The browser is free to cache the page itself in some form, but if that content has been modified via script the cached copy may not reflect this - if you want to preserve that state, you'll have to use some method that allows your script to run again and re-apply the changes, or to inform the browser that it should cache a different page (via redirects, iframe navigation, etc).
Of course, the browser may not cache the page at all, in which case your server app must be able to return the expected page in response to whatever request is sent - again, if you're doing partial page updates via XmlHttp or equiv, this may not happen unless you go out of your way to retain the apparent client state server-side (or use cookies, etc. to maintain it client-side in a server-accessible way).
BTW: i suspect you're using ASP.NET-specific stuff here, you might want to try that forum first.
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
Hi shog,
Thank you for the explanation. I just used a parameter to keep the history.
Thanks
hifiger2004
|
|
|
|
|
use this script in the source code
|
|
|
|
|
Hi,
I have a products page, this page is used to display any single product which was selected. If I save a products meta title, meta keywords and meta description in my products table and write it the page, how does this affect search engines to pick up the products? Any advice that I need to follow?
Thanks
Brendan
|
|
|
|
|
Adding the product title and description in meta is nice.. but if you wanna your site to be visibled in Search Engines, you should also consider using Friendly URL in your page... The most of search engines like the URL like this (http://urcom.com/product/fruits/apple ) instead of ("http://urcom.com/prod.aspx?id=11xx39387x&loc=NY&ctr=387")
Actually, there are a lot of things to consider if you wanna make your site visible... You may read the article related to SEO..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Thanks and yes I know that search engines like URLs. But my question is how do search engines search values of a product whose details is only displayed when clicked on? Meaning the values are still in the database. Please make this a bit clearer for me.
|
|
|
|
|
.NET Enthusiast wrote: how do search engines search values of a product whose details is only displayed when clicked on
I will share you the way I understand about Google SEO things.. Actually, the meta tag doesn't matter for Google since a lot of SEO experts used to trick the Search engine by adding a lot of meta tags in their pages..
1. Google calculates the Pagerank of your page or your site.
2. then, your URL should be Search-engine friendly.. If you wanna know about URL rewritting in ASP.NET, you can read this article URL Rewriting in ASP.NET
3. then, you can add your product information in the meta description and keyword
<meta name="keywords" content="meta data, meta-data, keywords..">
<meta name="description" content="meta data, meta-data, keywords..">
4. Google will read the content of your page (not just meta tags).. so, you should include h1, h2 or h3 in your page too..
5. You should generate the Google Sitemap for your website and submit your site to Google and other search enginee..
C# Google Sitemap Class
http://www.codeproject.com/useritems/10_SEO_Tips.asp
-- modified at 0:37 Sunday 18th November, 2007
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hey,
Do you know how to get an URL like that? I know it's called URL rewriritng but I do not know how to do it.
I have seen URLs like http://urcom.com/product/fruits/red-apple.aspx
Brendan
|
|
|
|
|
|
Hi,
What would be the best way of making a transaction from a aspx webpage to the SQL database for example,
where a customer orders a product, hits the order button and then this transaction goes through to the database where it automatically updates the records. Any ideas?
cheers
|
|
|
|
|
tgreeny wrote: What would be the best way of making a transaction from a aspx webpage to the SQL database
As you are asking about the best way, I would like to suggest you to use the different layers for making a transaction.. Let's say you are working on the "Product Order" page. So, you should create the Order class in Entity layer. If the user hits the order button after filling the required data on your page, you should fill those data to the "Order" object. then, Call the web service proxy call to invoke the business logic web service.. then, Call the DAL and pass the data from "Order" object to the stored procedure..
So, the structure of project will be like that ~
YourProject.Entities (Class Library)
- Order (Class)
- Orders (Class)
- [WebProxies]
-- OrderProxy (Webservice proxy generated by using wsdl)
YourProject.Web (Web Project)
- ProductOrder.aspx ( Webpage)
YourProject.BO (Web Service)
- OrderBO
YourProject.DAL (Class Library)
- OrderDAL
SQL Server
- OrderStoredProcedure
This is the way that we used in our live project... it works pretty well.. but I think that it might be a lit bit complicated for beginner..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
We can use normal insert sql statement. In the POSTBACK you have to write the script for inserting database. Read all the objects value you enter and using insert into statement insert all in the database.
|
|
|
|
|
i am creating a webpage i want to update the content in my webpage .
ex: the "news " column should update daily. explain briefly with one example;
|
|
|
|
|
Did you consider having that news content in a DIV and periodically update it using XmlHttp?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
He wants to update it *daily*, you want to use AJAX so people who leave the site open for days at a time see updates ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: update it *daily*
Missed that word. I was actually reading news from NDTV website where it shows a little marquee, which perhaps inspired me.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
The obvious thing to do here is to have a database which contains the daily news, a page which allows you to enter news for today, and a main page that pulls the most recent news story and shows it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I need to get a session variable's value (filename) into the aspx page,so that I can load a session based filename into Media Player Embedded.The Jscript works with a static filename at present.
// FROM THE CODE BEHIND THE ASPX PAGE
this.Session["WavName"] = Server.MapPath(@"..\captchaTmpWavs\")
+ this.Session.SessionID + ".wav";
// FROM THE ASPX PAGE
function StartMeUp()
{
MediaPlayer.Filename = "";
}
|
|
|
|
|
you can register the whole javascript function from code behind using clientscript.registerscriptblock
or you can try this
MediaPlayer.Filename = "<%=Session["WavName"]%>";
-----
|
|
|
|