I have a class which implements IHttpHandler that is designed to handle image resize requests. It handles Urls like so [URL] Currently the handler looks for myimg.jpg on disk, cuts a 100x100 thumbnail (if it isn't already present) and redirects the client to the thumbnail like so Response.RedirectPermanent("/some/virtualPath/to/thumbnail.jpg");
This has been working great, but I would like to avoid forcing the client to issue a second HTTP request. Is it safe to do the following? Server.Transfer("/some/virtualPath/to/thumbnail.jpg") All the MSDN documentation talks about using Server.Transfer() to redirect to an aspx page, so I'm not sure if this is the right thing to do or not.
when I'm building a menu in a view I get following error when code reaches <% Next item%> :
System.InvalidOperationException was unhandled by user code
Message=The value of a property that is part of an object's key does not match the corresponding property value stored in the ObjectContext. This can occur if properties that are part of the key return inconsistent or incorrect values or if DetectChanges is not called after changes are made to a property that is part of the key.
Source=System.Data.Entity
My view: (its a userview)
[Code]....
My Model [Code]....
My Datasource [Code]....
I use this way of looping frequent the only thing is that this is that this entity has a view as source and not a table, so I think it has to be related with that.
I am using webservice and Javascript, and in my javascript function, there's a function called onComplete(data).Now my problem is, I want to get 2 datas instead of one data argument in that oncomplete, is it doable? That "data" is the result of call from my webservice. So I am looking for something like this: onComplete(data1, data2) so that I can display it back to my aspx page
i m making an API in .net , that will communicate with its client with xml data. client software can be in any language php,asp.net etc. what is the best way to develop such API, i was trying to use the .net webservices', but [webmethods] does not allow non static data, and in my API there are lots of things that will work only with the non static data. any way to develpop it without using .net webservies?
I have a JQuery template, and I want to call a webservice and populate the fields in it. The issues I am having are, I'm not sure how to pass parameters in my $.ajax call (ideally, I want to pass a dictionary so I can pass as many or few parameters as I want). I tried data: { Key : Value } but get a 500 server error saying something about not a valid JSON primative.
Once the webservice is called, how can I get my data back in a JSON string that is compatible with a JQuery template? My webservices usually get a List and my jquery template works with a JSON object.
The problem is basically the format of data between client and server. My webservice call works fine, it's simply a problem of JSON and data. Edit: I have succeeded in calling the webservice with a dictionary, I am now trying to figure out how to get the data back. I'm getting a circular reference error.
I have a gridview with these columns: id,name,price,quantity,total. Also i have a button and checkbox in every row of gridview. When i check some rows i would like these rows with the button to transfer in another gridview.How can i do that?
The selected records from the gridview2 are saved there ViewState["SelectedRecords1"].The columns are id, name, quantity, total. Then these records are saved in gridview3 with
gridview3.DataSource = dt; gridview3.DataBind();
Now i would like to get these values from gridview3 and store them in a table in my database with same columns of course.Is there a way to do that?
i am new in asp.net. i have create a website. its related to tours and travels. Now when any customer get login to webportal then the login info of that customer should send to my system i.e. website. here it will check the user is valid or not or new according to that check user's permissions and send the data to the webportal.
then customer can search the specific data and book the some data say 'hotel'. that time the booking information should send to back to the system. so my query is how can i send the information from my system to webportal and vice versa...(can i do it with javascript)
I'm implementing the MVP pattern within an existing asp.net webforms application and I was wondering if there is a clean way to map my form data to a data transfer object. I'm not particularly fond of implementing it this way:
I have 2 web sites running on the same server. Web1 needs to transfer data to web2 (same web server, different webs), passing sensitive data from one to the next. The browser will be using https. Are cookies possible/advisable here? My initial thoughts where to encrypt the data and pass through the querystring, both sites using a shared key. Perhaps also pass an encrypted expiration date to prevent the url from being reused in history if it's on a shared computer. Figuring it's https and encrypted, initially it sounds ok. However, my gut tells me its unsecure. Another option is a session server but that seems a bit overkill for what I'm after.
What is the best way to securely transfer a single piece of data from 1 site to the next on the same web and do it relatively simply?
In my gridview I got 7 colunms, the first is a checkbox colunm. When the user clicks the "From" colunms data IE "who the message is from" two need to happen. One the application navigates to the next URL and the user can read his/her mail, two and here my issue how do I transfer the data from each colunm to the next page...I was thinking session some how?
i am trasfering the data from internet to database tables or entering information in to data base mean while i lost the connection then, the process gets stop for some time.if connection gets after some,is it possible to resume the data trasfer?
I have a form in which data data is entered. Thsi date is filled to a gridview. I want to transfer all the datas in gridview to a table in the database .Please help
I want to transfer data from an acces database to a sqldatabase. This is my code:
using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Data.OleDb; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class _Default : System.Web.UI.Page { #region page load protected void Page_Load(object sender, EventArgs e) { } #endregion protected void click_Transfer(object sender, EventArgs e) { OleDbConnection conn1 = null; OleDbDataAdapter da1 = null; DataSet ds1 = null; SqlConnection conn2 = null; SqlDataAdapter da2 = null; DataSet ds2 = null; // 1 Opzetten dataAdapter en dataset try { // Ophalen connectiestring en opzetten v/d connectie string connString1 = ConfigurationManager.ConnectionStrings["PrinterConnectionString"].ToString(); conn1 = new OleDbConnection(connString1); string connString2 = ConfigurationManager.ConnectionStrings["PrinterConnectionString2"].ToString(); conn2 = new SqlConnection(connString2); // Aanmaken van DataAdapters da1 = new OleDbDataAdapter(); da2 = new SqlDataAdapter(); // Opzetten SelectieCommand string sql1 = "SELECT * FROM tblPrinter"; OleDbCommand cmd1 = new OleDbCommand(sql1, conn1); SqlCommand cmd2 = new SqlCommand(sql1, conn2); da1.SelectCommand = cmd1; da2.SelectCommand = cmd2; string sql2 = @"INSERT INTO tblPrinter(PRINTER_ID, tblSoortApparaat, MERK, MODEL, LOKAAL_ID )" + @"VALUES (@id, @soort, @merk, @model, @lokaal)"; cmd2 = new SqlCommand(sql2, conn2); // InsertCommand dataAdapter cmd2.Parameters.Add("@id", SqlDbType.Int, 0, "PRINTER_ID"); cmd2.Parameters.Add("@soort", SqlDbType.NVarChar, 100, "tblSoortApparaat"); cmd2.Parameters.Add("@merk", SqlDbType.NVarChar, 100, "MERK"); cmd2.Parameters.Add("@model", SqlDbType.NVarChar, 100, "MODEL"); cmd2.Parameters.Add("@lokaal", SqlDbType.Int, 0, "LOKAAL_ID"); da2.InsertCommand = cmd2; ds1 = new DataSet(); da1.Fill(ds1, "PRINTERS"); ds2 = new DataSet(); da2.Fill(ds2, "PRINTERS2"); // Stap 2: Start bewerking!! DataTable table1 = ds1.Tables["PRINTERS"]; DataTable table2 = ds2.Tables["PRINTERS2"]; DataRow newrow = null; for (int i = 0; i < table1.Rows.Count; i++) { newrow = table2.NewRow(); newrow["PRINTER_ID"] = i + 1; newrow["tblSoortApparaat"] = table1.Columns[1].; newrow["MERK"] = table1.Columns[2].DefaultValue; newrow["MODEL"] = table1.Columns[3].DefaultValue; newrow["LOKAAL_ID"] = table1.Columns[4].DefaultValue; table2.Rows.Add(newrow); } da2.Update(ds2, "PRINTERS2"); lblMessage.Text = table1.Rows.Count.ToString() + " rijen zijn toegevoegd"; // bindgrid(); } catch (Exception ex) { lblError.Text = ex.Message; } } }
Here is my problem newrow["tblSoortApparaat"] = table1.Columns[1].; When i do that al the rows in my sql database are filt up with the columname. But i want the specik data. For example sql database:
Is there a way to transfer data from one custom user control to another custom user control? I have tried to just set the public property of the child to bind to the public property of the parent, but it does not appear to work.
I am currently in the process of creating data transfer objects (DTO) and I am having following queries egarding the same:1. There are some of the Properties of my DTO that will be used only in some places and So in other place it will be an overhead to populate these properties. How should we handle this design problem?2. Should we be including the Aduit information(such as the logged-in person's ID) in the DTO? If not, how do we transfer this audit information between the various tiers of the application?
I want to do a bulk data transfer from Oracle 10.2G into CSV or Excel sheet.I would either want that an entire table's data be populated into EXcel/CSV or the result of a select query be so populated.
1)Is there any stored procedure or function that can do this?
I know of a function in postgres which does this kind of a thing.There could be something similar.The second thing is the reverse of it.I want to transfer the contents of a CSV file into a oracle table after truncating it.