|
I have a table in asp and im using vb a code language. I have a table showing all the records. Please tell me how can i export them (in the same format like excel), may it be a pdf file, word or excel. Or can we print it directly using some built in feature.
Thanks
Bye
|
|
|
|
|
its simple friend..
u need to add
Response.ContentType = "application/vnd.ms-excel"
Response.Addheader "content-disposition", "inline; filename=YourFileName.xls"
these two lines top of ur page
ok
bye
Thanks,
Ankur Bakliwal
|
|
|
|
|
Where should i place this code. its not working.
Bye
|
|
|
|
|
these lines must be writen in
<%
line 1
line 2
%>
top of the 2nd page
u have to give a link of 2nd page for export, then in 2nd page u need to write that lines
ok
this will work
try it.
bye
Thanks,
Ankur Bakliwal
|
|
|
|
|
Use a different language.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
do one thing ok
copy that page wich u want to export.(say page1.asp)
rename it (copy of page1.asp -> page2.asp)
write these line in page2.asp at top
<%
Response.ContentType = "application/vnd.ms-excel"
Response.Addheader "content-disposition", "inline; filename=YourFileName.xls"
%>
noe call page2 from page1
it will export to excel
try it
if it is working pls tell me.
bye
Thanks,
Ankur Bakliwal
|
|
|
|
|
|
I use visual web dev 2005 express and office 2000.
VWE fails to add a reference to the word library object 9.0 at my project but add without trouble , the excel object library.((error message library not registred...)
I try the same thing (add a word reference )in visual C# 2005 and it's working fine for word and excel , so i assume that my word library is well registred.Any idea to fix this bug?
|
|
|
|
|
Hello,
I have a problem, I m not able to get an output in ASP from output parameter of SP.
i have SP, it returns some msg to a variale.
i don't know how to get that value in ASP.
Pls help me
Thanks,
Ankur Bakliwal
|
|
|
|
|
Hi Ankur
You might be better off on the ADO/SQL Server forum.
I would guess that your problem is that you are attempting to read the value of the output parameter before you have closed the resultset that has been returned (or else you haven't got "set nocount on " specified in your stored procedure).
http://msdn2.microsoft.com/en-us/library/aa905903(SQL.80).aspx[^]
Regards
Andy
|
|
|
|
|
Hi there,
I have some problem in fetching array in Javascript. Hope you will help me out.
From php I am creating 2d array and send only one to html,
for ex,
I have an array that is like :
array[1][abc];
and I am sending to html:
array[1];
now in html with the use of Javascript I want to fetch the value that is in array[1][abc];
array[1] will have an array. And 'abc' is the index of the value stored in array[1];
Please..Please..Please help me out. I am trying to solve this problem from much time
Thank You in advance.
|
|
|
|
|
When you try call it just use sent_array['abc'].
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
Hi,
Thank you for your reply,
Well I tried to do so but it gives me an error. Like I am storing value as per project name abc.
So when I tried to retrive then it give me error like abc is not defined..
|
|
|
|
|
How are you setting abc? Does it actually have a value at this point?
|
|
|
|
|
I am setting it in php such that I took an array of array and set 'abc' instead of giving number in index of the array.
|
|
|
|
|
Mate PHP and javascript are not compatible.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Thank you for your sugessions.
I got the solution of that.
Thank you once again.
|
|
|
|
|
Hi!
I want to populate datagrid with static string object. I have populated datagrid dynamically by getting data from database, but in my application i want to populate it with data given in my string object,not getting data from data base.
|
|
|
|
|
I would create a dataset. Add a DataTable to it. Add whatever columns to the datatable.
Insert your static stuff into the datarows. Point the Datatable.DefaultView as the datasource for your datagrid. Hope that helps.
Ben
|
|
|
|
|
I have an java applet which required the JRE 1.5 to run, now i need to program in such way that, is user is running on lower version. the plugin for jre should be installed without downloding the JRE or JDK...
Can any body help ???????????????/
|
|
|
|
|
How else could it be installed without downloading the file?
|
|
|
|
|
ok well, heres a lil problem i'm comfronting.
i'm currently desgining a website, and this is what i have:
<form action = "#" method = "post" name = "message" onsubmit = "return formValidation()">
<input type = "text" name = "celPhone">
well ok, aside from all the javascript functions and stuff, i just want to know, is there any way possible for me to send the variable "celPhone" to a popup window that i have?
i did some debugging on the popup, window with:
$CELPHONE = $_POST["celPhone"];
echo $CELPHONE; -- doesn't work
echo $CELPHONE."<b>Is your number</b>"; -- doesn't work
echo $_POST["celPhone"]; -- didn't work either.
now here's the interesting part, i put on the html:
<form action = "sent.php" etc...>
all those codes work fine, but not on the popup.
anyone have any solution for me? any suggestions...??
it would be great,
thanks in advance!
The slowest components sits at the keyboard.
|
|
|
|
|
Ok the problem you are having is that onSubmit occurs before the form is actually submitted. Can you provide the code that you are using for the popup?
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
ok, the code for the popup is simple, but before the popup, i have a couple functions executing for validation, here it goes:
<form name = "textMessage" onsubmit = "return formValidation(this)" method = "post">
etc...
function formValidation(thisForm)
{
with(thisForm)
{
var Phone = document.textMessage.celPhone
}
if(Phone.value == null || Phone.value == "")
{
this checks for the textboxt not to be empty
return false
}
if(emptyValidation(textMessage, "The field is empty")== false)
{
checks for this text box not to be emtpy neither
return false
}
// If these past conditions don't execute, then it wil go into
// this next function
sentConfirmationPopUP();
}
function sentConfirmationPopUP()
{
window.open("sent.php", "sent_window", "location = no, status = no, width=200,height=200, menubar = no");
}
that would be the code for my popup.
on the sent.php page, code would be:
$CELPHONE = $_POST['celPhone'];
echo $CELPHONE;
or
echo $_POST['celPhone'];
or even
echo "<b>".$CELPHONE."</b>";
nothing seems to work on that popup page, but like i mentioned before, if keep it on the same page, (action = "sent.php") then, it works, but i need it to work on that popup.
The slowest component sits at the keyboard.
|
|
|
|
|
The javascript is simply opening the popup window and telling to browser to request sent.php. The browser then sends a fresh GET request to the server for that page. Since its not POSTing to the page, none of the inputs will be available. The action attribute of the form element tells the browser to send a POST request to that URL with all the inputs values, which as you found out works OK.
The only thing I can think of off the top of my head is to set the target="_blank" attribute on the form to open it in a new window (BUT i'm not sure if this is a valid attribute of a form element? I suspect not, you'd have to check)
|
|
|
|