protected void btnSave_Click(object sender, EventArgs e)
SaveFileDialog s = new SaveFileDialog();
I want to open a saveDialog box to save a Web page...But When i run this coding it is showing me a error:
Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process.
I have a sql, which groups data by firstly, region, and then by product range. However, what I need to show is the data in a gridview for each region with the countries shown in the gridview along with the products sold with totals. Therefore, I would have a title headed for the Region and Product Range, and then show the gridview for the detailed data for that region, and then repeat the process again for the next region and so on and so forth. I am not sure how to go about this, and so I am looking for help. I was thinking about collecting the data from the query in either a List Object and then binding this to a Object Data Source or an Array, but I am unsure plus I don't how I can then get the gridview to show the data.
Hello all , i've a calender that i want the user to navigate through a particular period of time ,for instance he has to apply for a vacation 3 days in advance ,and can only apply for a vacation in this year , so the calender range should be from NOW +3 days to NOW + an year this is the code and the calender doesnt comply to it why? how to fix it?
Protected Sub ddlVacationTypes_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlVacationTypes.SelectedIndexChanged
Dim startDate As DateTime = Convert.ToDateTime(Now.ToShortDateString)
Select Case ddlVacationTypes.SelectedIndex
Case 0, 2, 3
startDate = startDate.AddMonths(1)
startDate = startDate.AddDays(3)
Dim endDate As DateTime = startDate.AddYears(1)
Dim dateSpan As TimeSpan = endDate.Date - startDate.Date
Dim i As Integer = 0
For i = 1 To dateSpan.Days