Alright.. I'm making a quiz system where the amount of questions and answer options is unknown.. Is it best to save the answer the user chosed when clicking submit to next question or save them all at once when the last question is submited?Lets say we have 3 questions, which one of these two options is the best for saving the data?
Question1 -> Save -> Question2 -> Save -> Question3 -> Save -> Done
Question -> Question2 -> Question3 -> Save -> Done
I want to add gridview row data into to data base I am doing it perfectly.My problem is that want all gridview row data save and then web method should be called but in my cause one gridview data save in array then call webmethod,then other row data save in array then call webmethod called this process should be so on.But I want it webmethod should be called when all gridview row save in array.
Follwing code
Jquery <script type="text/javascript"> $(function () { $("[id*=btnSubmit]").bind("click", function () { var Customer = {};
I have customer data saved into my database. when the customer access this data through his login and if clicks save to csv, the data has to be saved into their local machine. I am using asp.net version 1.1 and VS2003.
I cannot get this method to work. I get a system. XmlException. The code below jsut shows how I am starting out. I want to create a simiple document and save it before I start working out how to add nodes etc. The file path will be my local machine - this project will all be on my local machine at the moment not even on a web page/server at all yet. Just a simple app to learn the basics of XML before I add to a web application I'm working on.
When I click a button, it will bring out a ModalPopup panel saying "Pls wait" until the process is finished at the code -behind. The process is generating an excel file and prompt out a save as dialog box. However, When I called the code below, the modalpopup panel will not be closed automatically.
if I don't call the code above, the modalpopup panel is closed success.
I want the ModalPopup panel to be closed automatically after saving the file, is there any way to bring out a save as dialog box other than using Response. method?
I have a method in one class file with defination like this which gets the user id of logged person.
public string GetUserID(HttpRequest req) { .... }
I need to call this method in global.asax and save that value in session. I need to use this session value i need to use this Session value and assign that to label in Masterpage. I did not use global.asax before. And what should be the input to method... i have seen only Request is have the returntype HttpRequest. So i thought of giving that.
I am creating an Asp.net web site which will support dynamic data. When I am creating a dynamic web site from Scratch (from template in VS) all is working fine. But when I am trying to add dynamic entity (.edmx) file and running the application I am getting following error
"The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'. "
I am using VS 2008 SP1. My also have included CSS Friendly adapter [URL] in my project ( I mentioned this because my GridView Empty data template is not showing when using GridView's CCS Friendly adapter). I have a GridView and a DetailsView. When a record in GridView is selected its details information is shown in the Details View. Type of Data source I am using is ObjectDataSource. My Insert and Update methods works perfectly. It is only the Delete method that is passing null values to the underlying object delete method. My source codes for both the UI, BLL, DAL is shown below
My page (which basically contains a pair of Repeaters) renders and is displayed to the user.I'd like to have a "Download" button on the page which, when clicked, will propmt the user to save the page locally as an html file without losing any of the CSS formatting.
My CSS files are linked to via a Master Page.Currently, I have the button linked to some javascript that open will the Save As dialog, but all of the CSS formatting is lost, and it saves the page .I'm assuming that the button will need to open a new page which will re-create the data for the Repeaters and then save using StreamWriter, but I'm not exactly sure if that's right or how best to do it.
one button i use to save form entity.and other is to navigate to next pagwhen i click on save button i use jquery to save form entity in database. and form remains as it is
i have place some .txt files in my web application root directory. now i want to open a popup on button click with save button so that client can save this file on his/her PC. also can we auto set the path??? mean client jst press save button and file automatically stored his "D:\Foldersample.txt".
I have one AsyncFileUpload control ,one Attach button,one Listbox and Save button.
When Users browse the file and click the attach button, filename must be added to listbox. So in this way the user has the option to add upto multiple filenames to listbox. For this i have written the following code
[Code]....
this is source code
[Code]....
In Attach button click event i added the filename to listbox and saved the Asyncfileupload controls in different session variable.
When user clicks on save button all files has to be saved in application folder and for this i wrote the following code.
[Code]....
But iam unable to save all the files . Suppose i added two AsyncFileupload controls to session variables, only last file i,e. 2nd file can only be saved and couldn't get first file.
fileName is the name of the file ending with the file extension (.pgn). However, the file is saved as a .txt file, ignoring the extension that I am giving it. Would this have to do with the Response.Contenttype = "text/plain"? How can I get the Open/Save dialog to display and save the correct (.pgn) filename?
Also, if filename is a string separated by dashes or spaces, when the Open/Save dialog comes up, the filename is not displayed in its entirety but it is truncated where the first dash (-) or space (or comma) is encountered. How can this be remedied?
I have an ObjectDataSource that I want to perform updates using a business entity i.e. Type="Object"). Since the values for the entity are within a user control, I have stored a reference to the control in Session and in the updating event, set the new instance to the value of the entity from the user contol property (which also pulls values from the form viaother properties of the control):
Protected Sub MasterDataSource_Updating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs) Handles MasterDataSource.Updating Dim entity As New Login() Dim accountControl As AccountInfo = TryCast(Session("AccountCtrl"), AccountInfo) entity = accountControl.Entity e.InputParameters.Add("entity", entity) End Sub
My question is, how can I get the update method to pass this entity to the update method in my BLL class? It seems the Update method requires an ID or reference to the original object to use in determining whether any changes have taken place, but I don't really want to do this. In other words, I just want to use the Update event on my ObjectDataSource to pass my entity to the method ("Update") I set as a property and then let this business method handle the update of the data. Shown below, is the BLL update method I want to call:
Public Overloads Function Update(ByVal entity As Login) If entity Is Nothing Then Throw New ArgumentNullException("entity") End If MyBase.Update("UpdateLogin", entity.Username, entity.Password, entity.FirstName, entity.LastName, entity.Role, entity.Region, _ entity.Email, entity.Title, entity.TierID, entity.Street, entity.City, entity.State, entity.Zip, entity.Mobile, entity.Phone, entity.Fax) End Function
When I try to call this as it stands now, I get an error: ObjectDataSource 'MasterDataSource' could not find a non-generic method 'Update' that has parameters: ID, entity. Previously, I'd set up a long list of parameters of basic data types (string, int, boolean), but this is rather cumbersome and I was hoping to use an entity for this (FYI, I also got the same type of error when I tried this approach, but with the ID as the last parameter in the list). Perhaps what I'm doing here is atypical to how the ODS is normally used?? Has anyone done something like this successfully?
I have an application that has JS calling ASMX files to do asyncronous requests, using ASP.NET AJAX.
The problem is that I use always the same "onError" function, and now I don't know how to identify the method that rised the error, and it is giving me a lot of problems to debug errors. The parameter "data" of the onError method does not give enough information, for example:
en System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) en System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) en System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) en System.Web.Script.Serialization.ObjectConverter.ConvertObjectToType(Object o, Type type, JavaScriptSerializer serializer) en System.Web.Script.Services.WebServiceMethodData.StrongTypeParameters(IDictionary`2 rawParams) en System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary`2 parameters) en System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, IDictionary`2 rawParams) en System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)
Is there any way to know the webmethod that raised the error?
I don't know what I'm making wrong.I have a submit button, and on click it should execute the funktion in the code behind, but I get the error that the funktion is undefined.this is my code in the .aspx webform:
I want to create a web method that accepts a List of custom objects (passed in via jQuery/JSON). When I run the website locally everything seems to work. jQuery and ASP.NET and everyone is happy. But when I put it on one of our servers it blows up. jQuery gets a 500 error after the ajax request with the response being:
System.InvalidOperationException: EditCustomObjects Web Service method name is not valid. [WebMethod] public void EditCustomObjects(int ID, List<CustomObject> CustomObjectList) [code]...