473,668 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to autogenerate date

24 New Member
i am using a gridviw to display values from database

and using formview to insert values to gridview

i have the following fields in formview during insert mode like

Name :
StartDate:
EndDate:

now when i enter the startdate
the Enddate should automatically add 7 days to startdate and get inserted

if its textbox i know we can add like

DateTime.Now.Ad d(7);

but for a field in formview is it possible to do that
plz help me on this regard

Rama
May 25 '07 #1
2 1079
prabunewindia
199 New Member
hi friend,
i didn't get u clearly.
i think u have only the start date in table(database)
u want display the end date also in the form view!
so u get this in the query(sql) itself
select name, startDate, startDate+7 as endDate from <table>

i am not clear that with query (+7) not exactly correct.
u search for exact query.

in alternate method
u code in html page in the field's text propert as Eval(date+7)
i gave u only idea. not code
try to convert this to code
Prabu
May 25 '07 #2
klaydze
30 New Member
i am using a gridviw to display values from database

and using formview to insert values to gridview

i have the following fields in formview during insert mode like

Name :
StartDate:
EndDate:

now when i enter the startdate
the Enddate should automatically add 7 days to startdate and get inserted

if its textbox i know we can add like

DateTime.Now.Ad d(7);

but for a field in formview is it possible to do that
plz help me on this regard

Rama
hi, try this one. assuming that i put the value of the date in textbox
txtdate.text=fo rmat(Now.AddDay s(7),"MM/dd/yyyy")
May 25 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
5984
by: m_evergreen | last post by:
I would like the numbers 000001 to 999999 to autogenerate in a new database. I will be transfering information from another database and in that database the numbers 000001 to 010000 are already taken. They are used as identifiers in other programs and it would be easier if they were stored as written. Using identity the 0's are eliminated. Is there a way to keep them? Thank you, M
0
1705
by: Jason Coyne Gaijin42 | last post by:
I have seen several people looking for a way to access the Columns collection when using the AutoGenerate = true option. Some people have gotten so far as to find the private autoGenColumnsArray that has the information, but we as developers have no way to access this information. I have come up with a solution for the problem, (as I am sure many others have) using reflection. Here is some sample code that will print out the auto...
2
864
by: Jason Coyne Gaijin42 | last post by:
I have seen several people looking for a way to access the Columns collection when using the AutoGenerate = true option. Some people have gotten so far as to find the private autoGenColumnsArray that has the information, but we as developers have no way to access this information. I have come up with a solution for the problem, (as I am sure many others have) using reflection. Here is some sample code that will print out the auto...
1
1736
by: ypul | last post by:
Hi , Getting to the point directly, my query output doesnt have fixed columns , so I choosed "autogenerate columns" datagrid. I assign this dataset to my datagrid, but now I want my data should be hyperlinks, so that I can navigate from that page to another, depending on the link clicked. how can I do in autogenerate columns
2
1464
by: serge calderara | last post by:
Dear all, I have a datagrid which bind to a dataset object Datagrid autogenerate propertie is set to True. I need to create the first column of my grid to be used as an hyperlink and sending the content click cell to the next page as a parameter. I can do that without any trouble if my grid is not set for autogenerate. How can I do when columns name are issue from the dataset ?
2
8858
by: hazz | last post by:
in a databound scenario I have a database column value that is of type varchar with 3 discrete text values. Binding to this table column with autogenerated columns displays the text values in a DataGridViewTextBoxColumn column type. I would like to display images as follows but I need to do so with the DataGridViewImageColumn column type. How can I do that switcheroo ? Can I set autogenerate columns to false and somehow transform the...
1
11752
by: Dhruba Bandopadhyay | last post by:
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. The above message is what I get in my ASP.NET 2.0 page. I have debugging turned on and for those who want to see the stack trace, see below. In my old web site I had a frame set with a ASP page in left frame...
0
1846
by: yahiko | last post by:
Hello We have a large table of about 1.5M rows inserted per week. The expecte size is near 5 GBys per year. is there a form to autogenerate a partition by day in this table??? We have a date column with the system date, the idea is to create a partition for each new day... is there a form to achieve this without generating it manually? thanks
3
1926
by: Brett Wickard | last post by:
Anyone know of a good way to autogenerate stored procedure parameters to put into c# code? I don't need to do it on the fly, just while coding. I've got some SPs with a lot of parameters, so it would save some time to be able to make the code for the SqlParameter object automatically.
2
1850
by: aarti83 | last post by:
hello, i m developing a small project. but i m having some problems in that. plz if any one can help i will be very thankfull. i m using access as backend. 1)i want to auto generate nos in ID....it should be autogenerate from the last no in database. 2) how to collect data between two dates.
0
8459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8791
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8653
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2784
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.