|
|
Always welcome..
Apurva Kaushal
|
|
|
|
|
Hi, i need to do paging in datalist / datagrid, like the scenario i write below. All the values are fetching from database. in this case the paging options are A-C, D-G, ... I hope you people can understand. I need its solution little urgent.
Please give me any suggestion.
------------------------------------------------------------------------------------------------------
A - C D - G H - K L - N O - R S - V W - Z
A
ABB | Acme | AC Tech Drives | Adalet | Advance | AEG | Allied Molded Products | Amprobe | Asco
B
Bernstein | B-Line | Bodine
C
Cablofil | Carlo Gavazzi | Carlon | Coleman | Cooper | Crouse-Hinds | Cooper Power | Cooper Wiring | Cully
Regards, Sohail Arshed
|
|
|
|
|
Have a custom Paging build in the Footer Template of the DataList Control using Link Buttons with the Command argument as "A,B,C" for the first link button and "D,E,F,G" for the second and so on... On the ItemCommand Event of the DataList Control call the DB procedure by passing the Command argument and get the appropriate records and Bind them.
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Dropdown list has two properties called TextField and ValueField
When ur TextField is 2008-2009 assign value field to 2007-2008 and same for all other rows..
|
|
|
|
|
First tell me how many values are possible in this dropdown list...
|
|
|
|
|
Is there a page event called when we use response.redirect to redirect to any other page? The reason is that i want to perform some actions just before the page is redirected.
Thx in advance
Bye
|
|
|
|
|
Then what is the issue? First perform the actions and then redirect the user to the desired page.
Apurva Kaushal
|
|
|
|
|
I am a bit apprehensive whether it will work or not.. Try it once..I wrote a code for a similar requirement and its working ....
u can call some events..
u will have create a different class
public void Init(HttpApplication context)
{
(IsDisposed)
{
throw (new ObjectDisposedException(this.ToString()));
}
else
{
context.BeginRequest +=new EventHandler(context_BeginRequest);
context.EndRequest += new EventHandler(context_EndRequest);
}
}
//This function will get called before ending exection of any page.
private void context_EndRequest(object sender, EventArgs e)
{
if (((HttpApplication)sender).Context.CurrentHandler.ToString() != "UR_PAGE_NAME")
{
//Ur Code
}
}
|
|
|
|
|
Prateek G wrote: public void Init(HttpApplication context)
{
(IsDisposed)
{
throw (new ObjectDisposedException(this.ToString()));
}
What is this IsDisposed, im getting error on it in vb.net. Also tell me who will set the value of the context and can I integrate it directly to the Page_Init event.
Bye
|
|
|
|
|
ohh I am sorry, Remove that if condition dont use it....
|
|
|
|
|
public void Init(HttpApplication context)
{
(IsDisposed)
{
can you please tell me how to get the httpApplication context in my page_init parameters or if it is a method when shud i call it and what parameter shud i pass in it
Bye
|
|
|
|
|
Hi All,
I need to accept a file from end user and convert it to pdf and after converting the file it should show a dialog box which has open, save and cancel button (the way we have while downloading a file).
If the end user say open then it should be embedded in IE and if the end user say save it then it should be saved on end users machine.
Please help me...
Thanks in advance...
|
|
|
|
|
Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + sFileName + ".pdf");
Response.BinaryWrite(urFileStream);
// or if u have byte[] u can use Response.OutputStream.Write(byteArray,0,byteArray.Length);
Response.End();
|
|
|
|
|
Hi Prateek,
Thanks for the reply, what is urFileStream in the line Response.BinaryWrite(urFileStream);
Also I need to download the file also or embedd in IE. Can u please tell me how do I do this..
Thanks again...
|
|
|
|
|
Whatever file u r having u need to convert it to either in stream or in byte[] and then u can add it with Response... Everything else will be taken care...
Just check navneeth's post I guess there are some limitation on this kind of conversion. Here I am just changing the extension of file to .pdf but I dont know whether it will work with all kinds of files or not.....
|
|
|
|
|
ASP.NET 2.0 wrote: I need to accept a file from end user and convert it to pdf
What will be the file type ? You need to use some PDF conversion utilities to convert it to PDF.
ASP.NET 2.0 wrote: If the end user say open then it should be embedded in IE and if the end user say save it then it should be saved on end users machine.
What do you mean by embedded in IE ? AFAIK, you can't save the file to users system when they press save. You can redirect to that file and browser will allow user to download it. One question : File is uploaded from users omputer, and why again he needs to download it from server ?
|
|
|
|
|
Hi Navaneeth,
Thanks for the reply. File type can be any type of file ex: doc, xls, html or any other.
Also User can save it on server or not its his wish.
If user want to just view it then it should be opened in that browser itself and if he wants to save it then it should be saved on server.
If any other user can download/view the file.
I hope I made my self clear...
Thanks again...
|
|
|
|
|
ASP.NET 2.0 wrote: File type can be any type of file ex: doc, xls, html or any other.
But I don't think without using any PDF conversion utilities, you can't change a file to PDF.
|
|
|
|
|
Thanks again, can u please tell me, how should I do pdf conversion utility??
Thanks....
|
|
|
|
|
It would be pretty big process. Search for some free PDF conversion libraries. Writing a new one from beginning will take time.
|
|
|
|
|
Hi Friends,
I have one doubt,is it possible to call java function from ASP.NET,if possible means kindly tell me.
Thank You
Thanks & Regards
Senthil Kumar
|
|
|
|
|
Hi Frd
Use This Code...
window.onload = function;
or
Naik M
|
|
|
|
|
Hi Friend,
Thank you for your reply,i have another doubt can we call java web service function from ASP.NET.
Thank You
Thanks & Regards
Senthil Kumar
|
|
|
|
|
Naik A2Ze wrote: window.onload = function;
He asked "is it possible to call java function from ASP.NET?"
not Javascript..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|