|
Hi friends,
I want to export a grid into word in asp.net.
The grid contains product details like product id,name,date and image of the product.
If i export this grid into word file,it works fine except the image of the product.
The product image should not display.Is there any other method to export image into word.If so please help me?
Thanks and Regards,
Venkat.
|
|
|
|
|
Use this code:
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=FileName.doc");
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.word";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
myDataGrid.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
Sathesh.
Blessed is the season which engages the whole world in a conspiracy of love.
|
|
|
|
|
Hi Sathesh,
Thanks for ur response.
But i already tried this.This code only export data which are present in the grid and not display the image.
So please give me another solution.
Thanks and Regards,
Venkat
|
|
|
|
|
Good Morning guys
i did not know what subject to use, But let me explain my Problem, i have inherited a web application. In that Application the User is doing a lot of Selection that lead to the end of the page and automatically enabling a Scroll bar that hides user selection from User. below are the links of the images of how it looks before the end of the page and after it has reached the end of the page.
http://www.vbforums.com/attachment.php?attachmentid=68574&d=1232435913[^]
http://www.vbforums.com/attachment.php?attachmentid=68573&d=1232435899[^]
Thank you
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
I guess you have a css-class problem with a width or a height-property.
(this is the best answer I can give, You do not exactly tell what your problem is. I have to guess from the pictures)
modified on Tuesday, January 20, 2009 5:30 AM
|
|
|
|
|
how to shared folder from local pc, when a folder in another pc in LAN?
using c#.net...
i tried with WMI class. its helpful with local pc for local folder path, but i cant able to send n/w path (folder path like //server/root... etc) for another pc!!!
thnx in advance... am.net
i like to play with programming....
|
|
|
|
|
am.net wrote: how to shared folder from local pc, when a folder in another pc in LAN?
using c#.net...
This is nothing to do with ASP.Net.
am.net wrote: i tried with WMI class. its helpful with local pc for local folder path, but i cant able to send n/w path (folder path like //server/root... etc) for another pc!!!
Why ? Did you give the remote System Credentials (user id and Password ) ?
Try to dowload WMICodeCreator and Explore the tool . You will get the answer .
|
|
|
|
|
Dear Experts,
HOw to send email using only Javascript/HTML.Because My hosting doesnot support ASP,VB ,PHP,Perl Scripting.
plz help me.
Thanks in advance
|
|
|
|
|
Just call a server page, you can use cgi scripts if you dont have any development software, to send your mail. ...
You can call the page using AJAx.
If this is not what you want, you can use
mailto:emailaddress
This is the simplest...
Abhishek Sur
|
|
|
|
|
Abhishek Sur wrote: you can use
mailto:emailaddress
|
|
|
|
|
Abhishek Sur wrote: If this is not what you want, you can use
mailto:emailaddress
This is the simplest...
Sathesh.
Blessed is the season which engages the whole world in a conspiracy of love.
|
|
|
|
|
Hello all,
I wand to read a pdf file using asp .Net and want to show contents of pdf file into a text area. Get a lots of code for viewing pdf file or writing the pdf file but not for how to read a pdf file.
Please help me...
|
|
|
|
|
Well I figured out a way to do it, but it requires that you have the full version of Adobe installed on your PC so that you can gain access to the Adobe APIs (which doesn't technically qualify as a free way to do it). Here is the code I used to read the contents of a PDF. You will have to add a reference to the Adobe APIs in your project:
Dim objPDFPage As AcroPDPage
Dim objPDFDoc As New AcroPDDoc
Dim objPDFAVDoc As AcroAVDoc
Dim objAcroApp As AcroApp
Dim objPDFRectTemp As Object
Dim objPDFRect As New AcroRect
Dim lngTextRangeCount As Long
Dim objPDFTextSelection As AcroPDTextSelect
Dim temptextcount As Long
Dim strText As String
Dim lngPageCount As Long
Dim Fora As Long
objPDFDoc.Open(tbdocdisplaypath.Text)
lngPageCount = objPDFDoc.GetNumPages
For Fora = 0 To lngPageCount - 1
objPDFPage = objPDFDoc.AcquirePage(Fora)
objPDFRectTemp = objPDFPage.GetSize
objPDFRect.Left = 0
objPDFRect.right = objPDFRectTemp.x
objPDFRect.Top = objPDFRectTemp.y
objPDFRect.bottom = 0
' objPDFTextSelection = objPDFDoc.CreateTextSelect(lngPageCount, objPDFRect)
objPDFTextSelection = objPDFDoc.CreateTextSelect(Fora, objPDFRect)
' Get The Text Of The Range
temptextcount = objPDFTextSelection.GetNumText
For lngTextRangeCount = 1 To objPDFTextSelection.GetNumText
doctext = doctext & objPDFTextSelection.GetText(lngTextRangeCount - 1)
Next
doctext = doctext & vbCrLf
Next
doctype = "PDF"
objPDFDoc.Close()
---------------------------------------------
Alernatively, you can browse these links and try helping yourself
http://www.componentsource.com/relevance/pdf/components/index.html?q=pdf+visual
http://groups.google.com/group/microsoft.public.dotnet.languages.vb.data/browse_thread/thread/99a3fbc1608f396e/236c45f7cf2713b5%23236c45f7cf2713b5
|
|
|
|
|
Hi My website contains some confidential documents which I want only authorized viewers can see.
I have used an http handler for authentication and authorization.
It works fine..But I am not being able to prevent Google's View As HTML option from showing those documents in HTML format.
Previously before using HTTP HANDLER I had used robots.txt.But it didn't work at all.
Can anybody help me?
Thanks and Regards
ARINDAM
|
|
|
|
|
ARINDAM1981 wrote: Previously before using HTTP HANDLER I had used robots.txt.But it didn't work at all.
I googled and found this link
http://computing.fnal.gov/xms/Services/Getting_Services/Web_at_Fermilab/Restricting_Access_to_Web_Pages
|
|
|
|
|
Hi There.
I had two link buttons addCountry and addState.On both these button I had attached Modulepop Up Extender of Ajax.On click of these buttons I am opening a panel as pop up.Through this popup I am trying to add country and state.I am using single panel as popup for these two link button.Now what I want to do is to change the name of label Name in Popup panel to StateName if I am adding state on click of link button.I tried with javascript but what happens popup displayed first.Can any one help me.I am using Asp.Net 2.0 with C#.Net.
Thanks,
|
|
|
|
|
If you could share your code, we can help...
check the ID of the control, get the control using javascript and then do what you want.
Abhishek Sur
|
|
|
|
|
where's "Application Center Test" for VS2008? ... Sorry haven't done this for sometime has it been gone for long time? What you use now then?
Thanks
dev
|
|
|
|
|
You need the tester edition of VS2008
only two letters away from being an asset
|
|
|
|
|
|
I've recently started ASP.NET, and am making simple pages (in C#).
I have a simple app, with one page - index.aspx, and it's codebehind file index.aspx.cs
The index page has an asp label with the id 'myLabel'
The page load in index.aspx.cs sets this myLabel to "Hello world". Simple.
(basically myLabel.Text = "Hello world")
I decided not to go the codebehind way, and instead compile the index.aspx.cs file into a dll.
When using .NET Framework 1.1, it all works fine. I put the dll (generated at the cmd prompt by csc /t:library index.aspx.cs) into a bin folder, remove the .cs file, and the app works fine.
When I do this in .NET 2.0, I get the following message when trying to compile the DLL:
index.aspx.cs(17,13): error CS0103: The name 'myLabel' does not exist in the current context
Can someone explain what I'm doing wrong? Am I supposed to do things differently for .NEt 2.0?
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
you must PUBLISH your website if you want use dll instead of code files
go to menu on VisualStudio and find publish...
|
|
|
|
|
I don't think that's the solution. My code works fine in .NET 1.1 I don't have visual studio etc.
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
|
Hi.
I have a WebUserControl. It has a Text property ( I've written it )
I need an event in this class (my userControl) that fires by changing the Text Property.
I wrote an Event like this in my usercontrol event:
Public Event Text_Changed(ByVal sender As Object, ByVal e As EventArgs)
and in another class I've written this:
AddHandler Text_Changed, AddressOf MyMethod
Public Sub MyMethod(ByVal sender As Object, ByVal e As EventArgs)
End Sub
But I don't know how automatically runs the MyMethod by changing the Text Property of userControl
Best wishes
|
|
|
|