|
Write an if statement which checks today current date and then either take 2 away from that or add two to get all dates around the current date
example of date calculation
http://www.java2s.com/Code/ASP/Development/Datecalculationplus7daysC.htm
We are not a Code Charity
|
|
|
|
|
No i didnt ask add or minus from the given date...,
I asked based on current date it have to enable that week dates only...,
That also want to be enable up to current date only...,
Thats y i explained for example this month week dates like this 1 to 7 , 8 to 14 , 15 to 21 , 22 to 28 and 29 to 5
Now the current date is 24 so it have to enable 22 to 24 dates only...,
Suppose the current date is 20 thne it have to enable only 15 to 20...,
Plz give me some solution for this...,
Here i can add or minus dates..., based on current date have to enable only current week dates
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Yeah but by using add subtraction you can add or take seven days from the current date and get everything in between, that is why I was sending you down that route
We are not a Code Charity
|
|
|
|
|
Hi!
I have a dropdown that is bound to a datasource. The datasource is connected to an OracleReader. I select several fields and would to like display some of these fields in textboxes when I click on an item in the dropdown.
Is this possible without doing a separate select?
|
|
|
|
|
Sure - just pull the data out for the ones you want to show, and put them in the textboxes
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Can you illustrate this with a line of code?
I know how it's done in theory, but not the syntax. Can I go directly on the DataSource?
|
|
|
|
|
Try using the DropDown.SelectedValues method to get the values of the selected items then just assign those values to the textbox in which you wish to diplay them.
eg. textbox1.text = DropDown.SelectedValue.ToString();
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
Thanks, but it's not the selected value I'm after.
Say that my query looks like this:
SELECT PERSON_ID,PERSON_NAME,PERSON_ADDRESS
FROM PERSON
ddlPerson is bound with this query. Value is PERSON_ID and PERSON_NAME is the displayfield.
When I select a person in the dropdown I would like to display PERSON_ADRESS in a TextBox.
|
|
|
|
|
You then use that selected person's id to access the database and retrieve the value as such:
int id = ddlPerson.SelectedValue.ToString()
UserInfo ui = con.GetUserByID(id);
tbPerson_Address.Text = ui.Person_Address;
Make sure that the people databound to the list are databound by their id value and this code should work just right.
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
Sorry, don't convert to String.
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
Thanks, but I was wondering if I could get the value directly from ddlPerson's DataSource somehow.
|
|
|
|
|
I am a beginner in asp.net. I am using sql database as a backend and asp.net with c# as frontend. Can anybody tell me how to save records in sql database through code.
|
|
|
|
|
This is an example of a situation where you are sufficiently a beginner that you should not be writing any sort of commercial code, and the code you're writing to learn, should be based on a book you're working through. You asked a very top level question, one trivially answered with a google search, or best answered with a book. I can't imagine how I'd give a detailed answer to such a broad question in the context of a forum post. Perhaps you should do some research and ask here when you have sufficient experience to ask specific questions, and to understand the answers ?
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
http://www.asp.net/LEARN/videos
a nice easy video for you to watch
We are not a Code Charity
|
|
|
|
|
How to reduse this Reload a new page into the browser to fire the unload event for this page. and I can also use the back or forward buttons to load a new page and fire this event.?????
|
|
|
|
|
You can't. IE doesn't give you that sort of control.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Hi iam binding my gridview in runtime Using dartabase...,
So its in autogenerate columns true mode...,
How i can tell my particular cell value want to be left align?,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
You can't, you need to create a template for that, and you're skipping that step with the autogenerate. You may be able to do some sort of change in the item data bound event, but it seems like a hack compared to just creating your template in the first place
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Hi
I am trying to do ajax with jquery and I am finally making some progress.
I been following this tutorial
http://www.codeproject.com/KB/ajax/AjaxJQuerySample.aspx[^]
and it basically seems that in order to get jquery ajax to work you need to make a separate file for the code you want to get back.
Now in the article it states this: "(**Note: You could also point to an HttpHandler, but in the interest of brevity, this example will follow this method.)"
So am I correct basically if I followed the tutorial I would have to make a separate file for each of my ajax functions? So if I got 6 buttons that do 6 different ajax requests I would need 6 .aspx pages? Or 6 of these HttpHandlers?
If some where are some tutorials on HttpHandlers used with jquery?
|
|
|
|
|
I don't think so, I think you can pass something on the URL to tell your HTTP handler which action to perform. If you just create a new HTTP handler using the VS IDE, you can point to that, and write code in there to return whatever you like.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Hi,
I am new comer to .Net.
I am developing a simple application in C# and Asp.In that application I have to write the code to download a software from particular site and the code to install that software in our system.I don't have any knowledge on how to create set up file,code to download, .Exe file etc.
Please anyone Help me.I will be very thankful to them.
Thanks in Advance
|
|
|
|
|
you can't install a program from ASP.NET. You download a file by providing a link to it, or if you prefer, using Response.BinaryWrite to pass it back from a page.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Please search the Internet before posting questions like the above.
If you are a newcomer to aspnet the search for tutorials
We are not a Code Charity
|
|
|
|
|
Dear all ,
I am using C# ,asp.net2.0
I am making question list (as question are dynamic) I list in gridview and inside gridview dropdownlist populated with possible response.
Now I have to fetch each row of gridview and user response against it on button click outside of gridview
Please suggest some link or ideas
Thank you
regards
imran khan
|
|
|
|
|
Try it..Wait for good Solution...
Under button Click
for(int i=0;i<=gridview.rows.count-1;i++)
{
string answer=gridview.rows[i].cells[index].text;
}
|
|
|
|