|
i have set the data from database through form view..all the rows came with insert item template..but while running the page the form view is not coming.i want to add the item in running time.in sqldatasource properties there is also isert quiry..while click on quirybuilder,it showing insert quiry error cant pass string.wht z the solution
|
|
|
|
|
Hello Everybody,
I want to design a gridview where there is a option to create a new row for the user. suppose there is a button and by clicking the button a new blank row added to the gridview. The user can add more than one row. If possible make the button present in a column of the gridview so that when the user click the button a new row created along with the button column also.
plz give some idea to do or the solution.
Happy Coding...
AS@13
AS
|
|
|
|
|
You can take a look at this[^]. This will help you out in that.
Apurva Kaushal
|
|
|
|
|
Hi,
Thanks yaar..
But it not solve my problem...
the problem is that the button should be in last column of the Gridview and user can create more than one row as per the requirement..
plz help me out..
Happy Coding
AS
|
|
|
|
|
Regarding the columns you can have it where ever you want. And for adding multiple rows once he has added one record afterwards he can again add another one.
Apurva Kaushal
|
|
|
|
|
But I also want to display those new entries in gridview to the user. plz send me the code if u have.
Thanks
AS
|
|
|
|
|
Once he has added the row you can bind the gridview again after that you will get the gridview with the added row.
Apurva Kaushal
|
|
|
|
|
|
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...
|
|
|
|