|
How can a new row be added to the grid view using JavaScript code?
|
|
|
|
|
sofiz.p wrote: grid view using JavaScript code?
Javascript works on the client side, it can't identify grid view. AFAIK, you have two alternatives
1 - Use AJAX to request to a server method which adds a new row to grid view
2 - Gridview will be rendered as HTML table. Use Document.CreateElement() in javascript to create new row elements and add it to the gridview table.
|
|
|
|
|
I want to add multiple records at a time.
When clicking the JavaScript button a new row should be added to the grid. After I fill the row and make the necessary validations, I should be able to add another row without saving the previous row so that I can delete or modify it whenever I want (all operations are client side till now) until you hit the save button. When I click on save, I have to add all records to the DB at once . Do you know how to use javascript for this?
|
|
|
|
|
The easiest way is to use an AJAX ASP .net UpdatePanel. It will go to the server side, but users won't notice of the flicker, it's a typical solution for this issue.
/// -------------------------
Braulio Díez
http://www.tipsdotnet.com
/// -------------------------
|
|
|
|
|
I want to add multiple records at a time.
When clicking the JavaScript button a new row should be added to the grid. After I fill the row and make the necessary validations, I should be able to add another row without saving the previous row so that I can delete or modify it whenever I want (all operations are client side till now) until you hit the save button. When I click on save, I have to add all records to the DB at once
|
|
|
|
|
HI All Frdsssssssss,
I have a web Appllication and i want upload on the server. Plz tell me Process step by step..... I am Waiting..
Thanksssssssss
Ramakant Singh
|
|
|
|
|
Hi ramakant,
If u want to upload your app. on the live server then first u need to web space. if u have already space then u have also access for that space ok. Now there are some software to upload a file on web server like filezilla, cuteftp, smartftpclient using this software u can uplaod your website on live server
|
|
|
|
|
Hello TarDuk,
Thanks for mailing...
Dear I have web space and also have cuteftp...
plz tell me Step how can Deploy ASP.Net Web application on live server.
|
|
|
|
|
open cuteftp. It will ask for urlname and username and password ok this 3 things is necessary
now there is one now there may be some folder depends on your configuration. then copy your folder from your hard drive and paste it into cuteftp which is currently opend your site ok.
then if all the page are static then no problem otherwise if u r using jsp,asp or dotnet u have to set and configure web.config file as per your application ok
|
|
|
|
|
If you are using Visual Studio 2005, you have an option called "publish web site", from there you can directly upload it into your web space, or you can publish it in your local hard disk and then manually upload that files using e.g. FileZilla.
I use normally the second option using FileZilla, it's free and works very well.
HTH
Braulio
/// -------------------------
Braulio Díez
tipsdotnet.com
/// -------------------------
|
|
|
|
|
Hi friends, I am developing one application. In our application there are two types of multimedia object like Image and flash object. And I want to save it into sql server 2005 I can save image into database and also retrieve it successfully. But I cannot save and retrive swf object to and from database can anybody help me.
Thanks
|
|
|
|
|
Swf files are similar like any other files. What is the content type you given when sending this to page, what problem you are facing when fetching the data ?
|
|
|
|
|
Ya that I know when we store image it will store as a binary and when we store swf file it will store like binary only. But the mail problem is that how can we retrieve it
I want to convert this 3 line only.
Response.ContentType = "image/jpeg"; // 1
Response.ContentType = "application/x-shockwave-flash"; // Done
System.Drawing.Image image = RetrieveImage(id, tname);
image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
How can we change this two line for shockwavw object
|
|
|
|
|
TarDuk wrote: System.Drawing.Image image = RetrieveImage(id, tname);
image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
Assume you have the byte array in b[] . Response.BinaryWrite(b); ?
|
|
|
|
|
private System.Drawing.Image RetrieveImage(string id,string tname)
{
System.Drawing.Image image = null;
strcon = System.Configuration.ConfigurationManager.AppSettings["ConnectionString"];
Con = new SqlConnection(strcon);
Con.Open();
Cmd = new SqlCommand("SELECT imgimage FROM latework where imgid='" + id + "'", Con);
Cmd.CommandType = CommandType.Text;
SqlDataReader Dr = Cmd.ExecuteReader();
if (Dr.Read())
{
byte[] imageData = (byte[])Dr[0];
MemoryStream memStream = new MemoryStream(imageData);
image = System.Drawing.Image.FromStream(memStream);
}
return image;
}
This is my code to retrive an Image ok now can u do something?
Thanks
|
|
|
|
|
TarDuk wrote: if (Dr.Read())
{
byte[] imageData = (byte[])Dr[0];
MemoryStream memStream = new MemoryStream(imageData);
image = System.Drawing.Image.FromStream(memStream);
}
return image;
}
Replace this with
byte[] imageData = (byte[])Dr[0];
Response.ContentType =
Response.BinaryWrite(imageData)
TarDuk wrote: private System.Drawing.Image RetrieveImage(string id,string tname)
If this function is in your page, make it as void. If it is in a class, you won't get access to Response object until you pass it to the class
|
|
|
|
|
Thanks a lot
N a v a n e e t h I will try with that code and tell u later ok thanks again.
|
|
|
|
|
All job is done in asp.net 2.0
I have a link in main page to open a popup window, in which I have a gridview filled with data from database. Now the prob is, how can I access the hole gridview from the popup to the main page, the main page is already opened. I want the popup to close as I want to go to the main page with gridview from the popup.
The popup is opened using javascript.
Regards
Tutul Biswas
|
|
|
|
|
you want the gridview of the main page to popup . if yes just pass the condition as u fill the gridview on the main page and fill that same in popup.
Devjit Das
|
|
|
|
|
Tutul Biswas wrote: as I want to go to the main page with gridview
Take gridview in your hand and go to main page.
Tutul Biswas wrote: how can I access the hole gridview from the popup to the main pag
No need to access hole gridview.
just store dataset in session and use in main page
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
If I do so using response.redirect then the main page will open into popup.
But I want the popup will close and the gridview will transfer to main page.
Regards
Tutul Biswas
|
|
|
|
|
hi friends
How to delete or clear the data grid value in asp.net,At the time of post Back
|
|
|
|
|
Do you mean that Datagird retains the Data during post-back which you don't want?
Regards - J O H N -
|
|
|
|
|
yes frnd
thnx for advance
|
|
|
|
|
If the Viewstate is enabled then the DataGrid will persist the Data during postback. if you want to clear the DataGrid then set the Datasource property to Nothing and do a DataBind.
DataGrid.DataSource = Nothing<br />
DataGrid.DataBind()
Regards - J O H N -
|
|
|
|