|
Use Wizard control. you have no need to use multiple page.
bEst Regard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
|
1. You can use Server.Transfer Method and Cross Page Post Feature which will allow you a normal post back but to a different page in the application. In the New page you access the values of the Previous Page using the PreviousPage property .
[or]
2. You can Use Wizard Control which will help you to create a multi-step form entry process in a web page.
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
|
Hi,
I am new in .net. I am making an application using datagrid which is showing details about employees. So I want to make my data grid searchable. So i am using a textbox where user can enter some data into it and the matching result with all the columns will be displayed in the datagrid. If anyone knows how to do it or anyone hav a code for it. Please reply me
Rocki Star
|
|
|
|
|
You can try the following methods
1- When user enters search criteria, goto database and fetch the records and rebind the DataGrid.
2- When datagrid is initially binded, keep datasource in a session or viewstate, and do search on that datasource. If you are using DataTable to bind the grid, you can use Select() method to search the records.
|
|
|
|
|
Actually I am planning for that it will search for the criteria in all the column in datagrid. Search criteria is not restricted to only one column. So is there any method or event in datagrid which can help me.
http://www.preterra.com/flexsamples/gridsearch/gridsearch.html[^]
This is how one guy has achieved it using datagrid but he hasn't uploaded his code
Is it possible for me to do it in this style.
Thank You N a v a n e e t h
Rock Star
|
|
|
|
|
Rock Star. wrote: I am planning for that it will search for the criteria in all the column in datagrid.
Yes you can do as I specified in the first post. Assume your DataGrid is binded with a DataTable object. DataTable comes with a select(DataTableObject.Select() ) method where you can write queries. So form a query which looks for the matches in all the columns when user clicks search, pass it to the select method on the DataTable object.
You can keep the DataTable object in Session/ViewState .
|
|
|
|
|
Search for the same in your dataset or datatable and display particular row...
For doing the same you can loop through all the rows present in ur datasource(dataset or wotever u r using)
|
|
|
|
|
hi
if you are binding a dataset to the grid then it is very easy....
filter the dataset with the value entered in the text box
dataset.select(
|
|
|
|
|
joemonvarghese wrote: if you are binding a dataset to the grid then it is very easy....
filter the dataset with the value entered in the text box
dataset.select(
WRONG. Dataset don't have Select() method.
|
|
|
|
|
how i can down a file named say abc.tif from server ..for time being the server and the clinet machine are the same.
|
|
|
|
|
Saving file can be done by different methods now it depends how u r getting the file like user is browsing a file or you are getting file in stream.... etc.
some methods are
File.Create(string path);
and
File.WriteAllBytes("../",Buff[]);
Specify what you doing and what you want exactly..
|
|
|
|
|
Prateek G wrote: File.WriteAllBytes("../",Buff[]);
This can't save a file from server to client. ASP.NET won't be having permission on the client machine to do anything.
|
|
|
|
|
Sorry, you are right these permissions are machine specific...
Then Response.BinaryWrite(Byte[]);
Response.End()
Will give a popup which will allow user to save file...
|
|
|
|
|
hi sir ,actually i am having a abc.tif in the server.when clinet click a down load button this file has to download ..and when client again click sava then a save as pop diolog has to come to specify where to save this server file in the clinet machine ..will u give excat code...
|
|
|
|
|
Try something like this...
<br />
string sourceFile = "abc.tif";
<br />
<br />
FileInputStream filIpStrm = null;<br />
MemoryStream ms = new MemoryStream();<br />
filIpStrm = new FileInputStream(sourceFile);<br />
sbyte[] buffer = new sbyte[1024];<br />
int len = 0;<br />
while ((len = filIpStrm.read(buffer)) >= 0)<br />
{<br />
byte[] bbuffer = new byte[1024];<br />
System.Buffer.BlockCopy(buffer,0,bbuffer,0,1024);<br />
<br />
ms.Write(bbuffer,0,1024);<br />
}<br />
Response.OutputStream.Write(ms.ToArray(), 0, Convert.ToInt32(ms.Length));<br />
<br />
filIpStrm.close(); <br />
Response.ClearContent();<br />
Response.ClearHeaders();<br />
Response.ContentType = "application/octet-stream";<br />
Response.AppendHeader("Content-Disposition", "attachment; filename=AAA.tif");<br />
Response.Flush();<br />
Just check how can you access the file like I have written directly Source file name, just check how can you get your file in byte[]....
|
|
|
|
|
sir where i have to attach this code sir
|
|
|
|
|
You must be allowing user to save the file on some button click or something so you ll have to write the code in that event..
|
|
|
|
|
Response.AppendHeader("Content-Disposition", "attachment; filename=AAA.tif");
may i know wat for this one and can i get a save as popup dialog box
|
|
|
|
|
This is the part of code which is allowing a pop up to appear and open file as an attachment if you wont do so the file will get open in same window... filename u can give wotever you want..
I never tried for SaveAs button so sorry no idea... You can google it out but by the way Save button will also provide same functionality, It will allow user to select desired location to store the file..
|
|
|
|
|
If you want Open,Save and Close button I guess you need to Response.End() instead of Response.Flush() just check it and update if required....
|
|
|
|
|
Error 2 The type or namespace name 'FileInputStream' could not be found (are you missing a using directive or an assembly reference?) D:\jagadeesh\serverdownload\Default.aspx.cs 30 25 http://localhost/kumars/serverdownload/
sir
i copied the code wich u sent but iam getting the error like this Fileinputstrem and i wrote using system.io also anything ohter i have to specify
|
|
|
|
|
ohhh I forgot to tell u its a java.io stream Add vjslib and vjscor in references and then add namespace java.io
|
|
|
|
|
sir thanks its getting the save file diolog box ...sir now want the dowloaded path in a variable
|
|
|
|