|
Hi all,
I am using a dropdownlist in that i want to add the current year and when the new year comes i want to add the new year keeping the previous year in the dropdownlist.
How can i do it???
Thanks in advance.....
|
|
|
|
|
You post a constant stream of questions that leave me feeling you are totally untrained and have absolutely no idea what you're doing. I also get the feeling you've never invested in a book, a class or even bothered to try to use google. Why are you persisting with this if you're not willing to apply yourself ?
This is so trivial. DateTime.Now tells you the year today. So, add years to your drop down from today back to what ever hard coded starting year you like, or a specific number of years if you prefer.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello Everybody
I have more than 20 pages on my application
Example: default.aspx, product.aspx, order.aspx, login.aspx, resister.aspx, offer.aspx etc.
Just think, A new customer visiting my website and likes some product from my website. He added some product on ShoppingBox. After that he clicked ORDER button.
You know without logged in no one can place any order but that customer is totally new. So Customer need to resister first to logged in. Also he added some product on shopping chart.
My question is:
1. After resister and logged in how can I send back that customer to order page
2. How can I show that shopping chart which customer is added
Any solution !!
Thanks
Sarfaraj
Sarfarj Ahmed
|
|
|
|
|
typically, a login page takes the redirect page on the URL. And you'd store the cart contents in a cookie or the session, if they are logged in, or not.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks for your quick reply.
It does make sense.
Sarfarj Ahmed
|
|
|
|
|
But
Just think abuot CodeProject.com
I can logged in from anywhere on this site.
Is their anything I can do:
After Logged In page will be redirect to previous page
Example:
If i click login btn from product.aspx then login.aspx will come. After logged in page will be redirect to product.aspx
waiting for your reply
Thanks
Sarfaraj
Sarfarj Ahmed
|
|
|
|
|
Do it now. You'll see that CP does exactly what I was talking about. It redirects to the login page and passes to the login page, the page to go back to, on the URL. So, once you login, it reads that value and navigates back to that page.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
thanks a lot
i will let you know my result
Sarfarj Ahmed
|
|
|
|
|
Hi mates,
Need help again. About adding textbox value in gridview footer template, would it be possible? How will i do that? Note: The textbox value is come from the maxid of sql query. When the gridview page will load, it should have initial value one of the textbox.
<ItemTemplate>
<asp:Label ID="lblUserId" Text='<%# Eval("UserID") %>' runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblUserId" Text='<%# Eval("UserID") %>' runat="server"></asp:Label>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtUserId" Text='' runat="server"></asp:TextBox>
</FooterTemplate>
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
Hi....I have two drop-down List boxes.How to update one drop-down list box based on values of other drop-down list..
E.g: Drop-down list 1 contains cars like Toyota,Hyundai etc...
If Toyota is Selected
(drop-down list 2 it must be updated with models of Toyota)
else Hyundai is selected
(drop-down list 2 must be updated with models of Hyundai)
All these data must be taken from SQL server
I am able to display the drop-down list 1 but i am not sure how to display only corresponding models of the selected Make(drop-down list1)
|
|
|
|
|
Why is this asked so often when it's so trivial ?
1 - handle the changed event of the first list
2 - in the event, read the value, and use it to populate the second list
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I asked this because i am unable to pass the values.....can u provide me with an example....
I am not sure of how to pass the Make value to database inorder to get the Model.....
Give me one example
|
|
|
|
|
Well, typically, there is an id stored as a value for the first list, so you end up with something like
select * from model where makeID = @makeId
as a stored proc which you call using the id from the selected column.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
This can also be done with AJAX. You have the user-facing page, an AJAX script, and a dynamic page. The user's selection passes a value over an XmlHttp request to a dynamic page, the output is returned via XmlHttp, and the contents of the user-facing page are changed via Javascript. Check out this example which has samples of all three parts-
http://w3schools.com/ajax/ajax_database.asp[^]
Good luck!
Ranjit Viswakumar
Professional Services Specialist
HostMySite.com[^]
|
|
|
|
|
Sure - it's almost the canonical AJAX example. I was just trying not to confuse the guy tho.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello
SQL Server Databse keeps order information.
I want to send an automatic email to customer if order has been placed.
Any Solution
Thanks
Sarfaraj
Sarfarj Ahmed
|
|
|
|
|
Yeah, the solution would be to automatically send an email when the order is placed. Might want to do that somewhere around your insert statement in your code, since that's probably where the order is complete in your end.
|
|
|
|
|
Did you consider trying to write some code to do this ? I don't see what SQL Server has to do with it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
could you please give some instruction
Sarfarj Ahmed
|
|
|
|
|
|
Thank you very much, i will folloe your instruction.
Sarfarj Ahmed
|
|
|
|
|
is this query correct?
"INSERT INTO Create(names,city,state,email,username,pword,securityq,answer) VALUES('" + name + "','" + city + "','" + state + "','" + email + "','" + user + "','" + pswd + "','" + question + "','" + ans + "')";
error is Incorrect syntax near the keyword 'Create'
|
|
|
|
|
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...) is the synatax from w3schools.com[^]
is Create your table name?
try putting insert into `create` (...) values(...)
example
INSERT INTO `Persons` (P_Id, LastName, FirstName)
VALUES (5, 'Tjessem', 'Jakob')
|
|
|
|
|
What is name, city, etc ? Where do they come from ? It looks to me like your database security is a nightmare.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
"Create" is a reserved word in MSSQL so it cannot be used as the name of a table. Here is a full list of reserved words:
http://msdn.microsoft.com/en-us/library/aa238507(SQL.80).aspx[^]
You should be able to insert into the table by quoting the table name like so:
INSERT INTO "Create" ...
Joe Ceresini
Network Engineer
jceresini@hostmysite.com
Hostmysite.com
modified on Monday, February 2, 2009 7:10 PM
|
|
|
|