|
Hi,
You could the the techniques in the following article to iterate through the data:
http://www.c-sharpcorner.com/UploadFile/DipalChoksi/exportxl_asp2_dc11032006003657AM/exportxl_asp2_dc.aspx?ArticleID=000c64fb-8a22-414a-8247-984335aaa0eb
And then use the following free library, iTextSharp, to put it into PDF format:
http://itextsharp.sourceforge.net/
This should do the trick for you.
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
how to remove the time part in the date display wen displayed in the datagrid ... when the columns are created during the runtime . the code snippet is
oledb.Open();
OleDbDataAdapter ad =new OleDbDataAdapter("select PTID as [Patient Id] ,PTName as [Patient Name],AppHospId as [Approved Hospital],AppDocId as [Approved Doctor],AppDt as [Approved Date ] from APPT where ICID='"+Ah+"'and UHID Is Null and AppSpecId='"+ SpecId.SelectedItem.Text.ToString()+"'and AppDt>=DateValue('"+F_txt.Text +"') And AppDt<=DateValue('"+T_txt.Text +"')",oledb);
DataTable ds=new DataTable();
ad.Fill(ds);
DataGrid1.DataSource=ds;
DataGrid1.DataBind() ;
DataGrid1.Visible=true;
oledb.Close();
i want the Approved Date column to display only the date not the time part like (12/09/2008) and not as (12/09/2008 12:00 am).. can anyone help me out with this
|
|
|
|
|
You can convert it in the query. Look at the CONVERT function if you are using SQL server.
jaya86 wrote: select PTID as [Patient Id] ,PTName as [Patient Name],AppHospId as [Approved Hospital],AppDocId as [Approved Doctor],AppDt as [Approved Date ] from APPT where ICID='"+Ah+"'and UHID Is Null and AppSpecId='"+ SpecId.SelectedItem.Text.ToString()+"'and AppDt>=DateValue('"+F_txt.Text +"') And AppDt<=DateValue('"+T_txt.Text +"'
Ever heard about SQL Injection?
|
|
|
|
|
hi jeyaraman,
give like this
select convert(varcghar(10),approveddate,103) as appddate from .....
T.Balaji
|
|
|
|
|
sory its varchar--- typing mistake
T.Balaji
|
|
|
|
|
Anybody know of any good tutorials on creating a wysiwyg in an asp.net web page? I've seen alot of stuff on google that you can purchase or download, but I want to create my own just to learn.
|
|
|
|
|
if i am not wrong, there is good article on Codeproject . you can try to find it .
cheers,
Abhijit
Think Sharp | Code Sharp | C Sharp
|
|
|
|
|
Easy way is to download some opensource editors and look at the code. TinyMCE is a good one.
|
|
|
|
|
"The process identity for the web server account must have a local user profile. See the readme document for details on how to create a local user profile for both machine and domain accounts."
I've never done this. Can someone tell me how to do this? I'm not sure which readme the message is referring to.
|
|
|
|
|
Hi
I have MV2005 and nhibernate from August 2008.
This is snippet of my code:
ExampleClass.hbm.xml:
<pre>< hibernate-mappi ng xmlns="urn:nhibernate-mapping-2.2" auto-import="true";
<class name="NHibernateExample.ExampleClass, NHibernateExample" table="ExampleClass">
<id name="ExampleClassId" column="ExampleClassId">
<generator class="native" />
</id>
<property name="Text" />
</class>
</pre>
App.conf
<pre><c onfiguration="">
<configsections>
<section>
name="nhibernate"
type="System.Configuration.NameValueSectionHandler, System, />
Version=1.0.5000.0,Culture=neutral, /> PublicKeyToken=b77a5c561934e089" />
</section></configsections>
<nhibernate>
<add>
key="connection.provider"
value="NHibernate.Connection.DriverConnectionProvider"
/>
<add>
key="dialect"
value="NHibernate.Dialect.MsSql2005Dialect"
/>
<add>
key="connection.driver_class"
value="NHibernate.Driver.SqlClientDriver"
/>
<add>
key="connection.connection_string"
value="Server=localhost\SQLExpress;Database=NHibernateExample;Trusted_Connection=Yes;"
/>
</add></add></add></add></nhibernate>
</c></pre>
Main code:
<pre> try
{
Configuration Config = new Configuration();
Config.AddAssembly("NHibernateExample");
ISessionFactory Factory = Config.BuildSessionFactory();
ISession Session = null;
Session = Factory.OpenSession();
ExampleClass ExClass = new ExampleClass();
ExClass.Text = "Test";
Session.Save(ExClass);
Session.Close();
}
catch (Exception exp)
{
MessageBox.Show(exp.Message);
}</pre>
I don't know what it's wrong. The program is aborting when go to this line: ISessionFactory Factory = Config.BuildSessionFactory();
Exception message is: "Could not find the dialect in the configuration"
I've read several solutions on different forum ( I've added xsd file, loaded additional dll file ) but it still don't working.
Robert&
I
modified on Tuesday, September 9, 2008 5:17 PM
<div class="ForumMod">modified on Tuesday, September 9, 2008 5:25 PM</div>
|
|
|
|
|
I have an interview for a job later this week and one of the requirements listed on the job description is "Web Portal / Web Parts development."
I have developed web portals in the past but I know that there are now a lot of third-party .NET portals available that are available.
What are the market-leading third party .NET portal frameworks these days? I seem to remember that DotNetNuke appeared to be somewhat popular a few years ago.
I would think that the SharePoint portal would be the most likely portal framework to be used with WebParts but I imagine that other third-party portals will support WebParts now.
Also, do you know if Microsoft provides a "lightweight" portal framework for organizations to use when a SharePoint implementation may be too expensive or possibly overkill for the needs of the organization?
|
|
|
|
|
I have added a ListView to my ASPX page and code behind but when I try to build it gives me a namespace error for the ListView. I see all of the other ASP controls in that namespace but why not the ListView?
|
|
|
|
|
|
Hello there,
I'm new in ASP.NET and I have a very simple and funny question but this will help me very much
My question:
How can I change the icon of my web page which appears in the top left of the Windows?
Thank you
|
|
|
|
|
|
Put this line somewhere between the <head> tags:
<link rel="icon" href="filename">
Regards,
--Perspx
Don't trust a computer you can't throw out a window
-- Steve Wozniak
|
|
|
|
|
Thank you Perspx. That was my answer.
Thanks more.
|
|
|
|
|
Check this site[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
I am doing some research on the new ASP ListView control. All of the examples I see have AccessDataSource controls for doing data binding. I want to be able to dynamically bind a generic list to the ListView control but can't find any examples. Can anyone provide an example?
Thanks,
Steve
|
|
|
|
|
Hi all.
when im trying to run my web application it gives error
"
Server Error in '/' Application.
--------------------------------------------------------------------------------
Login failed for user 'GDHOSTING\Iusr_3158850'"
What is the reason and how can i resolve it.please help me to come out of this
Thank You in Advance
modified on Wednesday, September 10, 2008 5:31 AM
|
|
|
|
|
Try with the following line under <system.web> section of your web.config:
<identity impersonate="true" userName="Your_User_at_Hosting" password="Your_password"/>
|
|
|
|
|
I am developing a web application where user will upload a word document. I will be parsing the word document and putting different parts into different places to show in html. Sometime there are some picture, charts etc. If i use windows forms application i can use CopyAsPicture() method of Range of Word and save it from clipboard to some file. But when i call this function from the webpage there is nothing put on the clipboard. Please help!!!Accessing
modified 9-Jul-22 21:01pm.
|
|
|
|
|
aman.tur wrote: If i use windows forms application
Not a good idea to think in terms of desktop development when doing server development. One needs to understand the environment in server software development. Or not, I suppose it's up to you.
aman.tur wrote: i can use CopyAsPicture() method of Range of Word
aman.tur wrote: But when i call this function from the webpage
method of Range of Word? So you are calling the method of a Range object which you get from a Word object? How are you getting the objects?
led mike
|
|
|
|
|
Man I'm getting objects using com interop and that is why i think if i can save uploaded file to some location on disk, create Word objects, I should be able to access the clipboard, because all this is happening on server side and not on client machine.
modified 9-Jul-22 21:01pm.
|
|
|
|
|
led mike wrote: How are you getting the objects?
aman.tur wrote: Man I'm getting objects using com interop
That does not answer my question. You probably need to post the relevant (only) code that creates the objects.
led mike
|
|
|
|