|
Use the Jet OleDb driver to programmatically connect and write to an Excel file. There are plenty of resources on Google that will show you how to do this.
Paul Marfleet
|
|
|
|
|
Hi,
I have a GridView on my page (see code below). What I want to do is have a link (or button, doesn't matter) which, when the user clicks on it, opens up another page and passes several variables to that page. Trouble is, I can't think of a neat way of doing this without it getting a bit messy. Surely there must be an aesthetic method?
Hopefully an easy one for the experts, just baffles me...
The control I am referring to is <asp:TemplateField HeaderText="Email">
Be very grateful for any advice.
Regards
Chris
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="View.aspx.vb" Inherits="View" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>WC BLM - Log Manager</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>3034kjng lm4gkl34m</h1>
<h2>Backup Log Manager</h2>
<h3>Log Manager</h3>
<p>
Status filter:
<asp:DropDownList id="SelectStatus" runat="server"
autopostback="True">
<asp:listitem Selected='true'>OK</asp:listitem>
<asp:listitem>Query</asp:listitem>
<asp:listitem>Error</asp:listitem>
<asp:ListItem>Resolved</asp:ListItem>
</asp:DropDownList>
</p>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" DataKeyNames="PARSERFILENAME" DataSourceID="AccessDataSource1" CellPadding="4" ForeColor="#333333" GridLines="None" BorderColor=black BorderStyle=solid BorderWidth=1px>
<Columns>
<asp:BoundField DataField="EMAILDATETIME" HeaderText="Email Received" SortExpression="EMAILDATETIME" ReadOnly="True"/>
<asp:BoundField DataField="BACKUPDATETIME" HeaderText="Backup Started" SortExpression="BACKUPDATETIME" ReadOnly="True"/>
<asp:BoundField DataField="CLIENT" HeaderText="Client" SortExpression="CLIENT" ReadOnly="True"/>
<asp:BoundField DataField="BACKUPTYPE" HeaderText="Backup Type" SortExpression="BACKUPTYPE" ReadOnly="True"/>
<asp:BoundField DataField="APPLICATION" HeaderText="Application" SortExpression="APPLICATION" ReadOnly="True"/>
<asp:TemplateField HeaderText="Status" SortExpression="STATUS">
<ItemTemplate>
<asp:Label ID="ReadStatus" Runat="Server"
Text='<%# Eval("STATUS") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="InsertStatusDropDownList"
SelectedValue='<%# Bind("STATUS") %>'
RunAt="Server">
<asp:ListItem>OK</asp:ListItem>
<asp:ListItem>Query</asp:ListItem>
<asp:ListItem>Error</asp:ListItem>
<asp:ListItem>Resolved</asp:ListItem>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Notes">
<ItemTemplate>
<asp:Label ID="ReadNotes" Runat="Server"
Text='<%# Eval("NOTES") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="EditNotes" runat="Server" Text='<%# Bind("NOTES") %>' TextMode="MultiLine" Columns="40" Rows="5" />
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Log File">
<ItemTemplate>
<a href="Logs/<%# Eval("PARSERFILENAME")%>" target="_blank">View</a>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Email">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField showeditbutton="True" HeaderText="Options" ButtonType="Button" />
</Columns>
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#E3EAEB" />
<EditRowStyle BackColor="SpringGreen" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/BackupLogParser.mdb"
SelectCommand="SELECT * FROM [VIEW] WHERE STATUS=@SELECTEDSTATUS"
UpdateCommand="UPDATE [VIEW] SET [STATUS]=@STATUS, [NOTES]=@NOTES WHERE PARSERFILENAME=@PARSERFILENAME">
<SelectParameters>
<asp:ControlParameter Name="SELECTEDSTATUS"
ControlID="SelectStatus"
PropertyName="SelectedValue"/>
</SelectParameters>
</asp:AccessDataSource>
</div>
</form>
</body>
</html>
|
|
|
|
|
You can use session variables to pass value from one page to another.
To open a new window, you can use window.open javascript function.
Hope you got the point.
Thomas
|
|
|
|
|
halol....
i dont understand by this
Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
i already import reference needed.......
how can i solve tis error?
thanks...... :->
|
|
|
|
|
Hi
guys , do any one have the idea how to create gif and jpeg images programmatically at run time,
suppose user provides the input font,color and back ground color and the web application generates gif or jpeg images from the available templates provided to the user, kindly reply ASAP,
thankx in advance,
regards,
|
|
|
|
|
Did you try Google[^]?
Paul Marfleet
|
|
|
|
|
hi
if(!entity.IsRecordedDateNull)
parRecordedDate.Value = entity.RecordedDate.Subtract(new TimeSpan(2,0,0,0)).ToOADate();
else
parRecordedDate.Value = System.DBNull.Value;
cmdParams.Add(parRecordedDate);
can any one explain what does this code mean.WHICH IS CEARTING A PROBLEM FRO ME ON RECORDING A TIME.
It making one min. less for specific timings 2:30,5:30,8:30 and 11:30 it is accepting in database as 2:39,5:39,8:39 and 11:39.
asp.net using c#.
mallika
|
|
|
|
|
Please make your subject so specific.
Don't write it like Help me its urgent.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
1. Try to write a useful subject.
Even if the question is urgent to you, it's never urgent enough to be mentioned in the subject line, or you wouldn't be posting in a forum at all instead of paying for assistance.
Almost every thread in this forum is about someone needing help, so that doesn't do anything at all to distinguish your thread from others.
2. You haven't supplied enough information about what you are doing.
What kind of database are you using? What is the data type of the field where you store the data? Why are you converting the DateTime value into an OLE Automation date?
Is the difference between the expected value and the actual value exactly one minute? Does the field really contain the time 2:39:00.0000, or does it contain something much more reasonable, like 2:39:59.9999?
---
single minded; short sighted; long gone;
|
|
|
|
|
my application is to record the time when i am entering the data. using sql 2005 abd data source as object data sourse.
At front end aspx page the textbox datatype is date time and used as datetime.minute property
this problem is occuing in recording a time.
|
|
|
|
|
scicorp wrote: At front end aspx page the textbox datatype is date time
A textbox always contains text. Do you parse the text into a DateTime value?
Why are you converting the DateTime value into an OLE Automation date?
What about the values? What do you have before saving, and what ends up in the database? Is the difference exactly one minute, or something else?
---
single minded; short sighted; long gone;
|
|
|
|
|
I am using Visual Studio 2005 and C# to develop a Web application. One of my Web User controls contains a GridView that I DataBind to a table in the database.
I want to use the update functionality of the GridView. There are some columns in the DataTable that I do not want the user to be able to edit (for example AuditDate and AuditUser columns). These columns I have made Read Only in the GridView. I test the control and use the edit option and change some of the values in the editable columns. When I hit Update it gives the following message: Cannot insert the value NULL into column 'AuditDate'. That makes sense because that column is specified in the database as not accepting nulls, but how can I add custom values to these columns when the update button is clicked?
When the database is being updated I want to populate the AuditUser column in the row with the name of the logged in user and the AuditDate column with the system DateTime.
Thanks.
Kobus
|
|
|
|
|
hi all,
i have adrotator in my webpage,
i want to update the images in regular intervels without using timer control.
i want pictures to be changed in regular intervels without refreshing the page.
how to access this?
i dont want to use update panel and timer control too.
is it possible to change the pictures in regular intervels without refreshing the page.
plz guide me...
-- modified at 6:38 Tuesday 9th October, 2007
|
|
|
|
|
Get it
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
can u explain me the procedure...
wat r the steps i need to do!
|
|
|
|
|
// VS.NET 2005 ASP.NET 2.0
For some reason ,i do need to create a class outside App_Code but that class can't be seen by any .aspx.cs file? How can i do this?
thank =)
another question
If i have a class in App_code and i want this class to see control(.ascx) in the project? How can we do this?
-- modified at 5:29 Tuesday 9th October, 2007
|
|
|
|
|
While adding your class files just selct the options with the .aspx page then you will get that along with that class file.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
how can i creat a ImageButton with text in the center?
for my menu
|
|
|
|
|
Get it
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Hi Guys,
I am using session for Admin login page.If the user is valid then it will create a session["admin"] = "true";
This will check in all Admin pages. so, if i copy the URL and paste it in the new IE window.it will redirect to login page,because the session is null. same thing i did in Mozilla browser it will not redirect to login page. Help me.
d.sengottuvelu
|
|
|
|
|
That's because there is only one instance of Mozilla. If you try to start another instance, it will just open a new window in the current instance.
As there is only one instance, there is only one client session. When you open the new window, it's still in the same client session and share the same setup of cookies.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi All,
I am using Tab Container and User Control. I need to add usercontrol depending on the tab selection. Ex: I have 2 tabs on my Form say Company1 and Company2 and on Company1 tab click I want to show User Control test1.ascx and on Company2 tab click I want to show User Control test2.ascx.
How do I add User Control???
Thanks in advance...
|
|
|
|
|
What is Tab Container.It's not control in VS2005. Maybe this link would help you: http://www.brettb.com/DynamicUserControlsWithLoadControl.asp
|
|
|
|
|
Thanks for the reply. Sorry the link couldnt open. Tab Container is Ajax control. I have added TabContainer Control in User Control Form and Depending on the Tab click I have to add different User Controls to that tab. Problem I am facing is that how do I get the ID of Placeholder in my aspx as on aspx I have the user control which has tabcontainer and depending on tab click I have to replace the respective User control.
Please help me.
Thanks again...
|
|
|
|
|
Hi,
My problem is to get audio files from server to client machine. Download all the audio files from server folder to client machine(to a aspecified folder)
Ramya
Ramya
|
|
|
|