I've read that OnClick is executed on the server and onClientClick is executed on the client. Is it better to use OnClientClick to do something like close a modal popup?
If my understanding is correct then this would avoid a trip to the server to accomplish the same task. This would be great for something that doesn't need to make a round trip to the server and back.
I have a nested ListView (Master/Detail) questionaire that was described in this posting: The inner list item must call a server method with three arguments. Thanks to several of you, I have code that properly generates the JavaScript; however, that code is not actually firing. Here is the declaration of the inner list view:
I have a page which allows the user to send email. After they click the submit button, I display a confirmation message. However, if the user clicks the browser's Refresh button once the confirmation message is displayed, the email is sent a second time (or a third, fourth, fifth, etc.). What can I do to prevent the Refresh button from resending the email?
i have a usercontrol inside an updatepanel. when i click some button this usercontrol will be loaded. and the usercontrol itself has anither button in it. the problem is that the usercontrol code behind is never executed and when the button is clicked the usercontrol disappears.
I'm having some problems with the module urlrewriter.net for ASP.NET.I have a multilingual site with a URL like this;
~/home.aspx To support languages I use this rewrite rule; <rewrite url="~/de-DE/(.*)" to="~/$1"></rewrite>
Then in my code I get the de-DE part and set the right culture for the current thread. All of this works well.After I login on the website I get a message "Hello, user x" to show i'm logged in. When navigating to another page, it doesn't display this message anymore and it seems like the page comes from the cache or something with the old (not logged in) data. Also, when I attach the debugger, nothing is executed for this request. If I visit the page like ~/home.aspx instead of ~/de-DE/home.aspx, does problem does not occur.
I need to insert values from the frontend into a mysql table. I am using a 3 layer architecture. the below is the code that is written in my dataaccess layer. the query is not being executed.
public int Insert(List<EmployeeUInfo> objInsert) { try { DataTable dtInsertRow = new DataTable();
I have problem on page bellow, in gdvCar_DataBound I add three buttons, when I click on any of them, page go to postback but doesn't enter in gdvCar_RowCommand and then that buttons ( and images that I also add in gdvCar_DataBound) disaper. Grid is then full like gdvCar_DataBound isn't execute. My question is why it doesn't enter at gdvCar_RowCommand ?
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using HMS.library; using System.Data.SqlClient;....................
I've reated a project containing 15 pages , (inculding one for logging in )well , i've noticed that actions located in the page_load function are not executed! (i've tested with changing the text of a label and a text box) and it's in all pages except the authentification page!i've read tht it's probably due to the DATETIME class used in pages. but is there any other explanation? or is there any way to fix the problem
PageMethod which supposed to be called/executed when "onChange' of dropdownlist is triggered is Not being executed. I have 3 dropdownlist being created at runtime/dynamically inside a compositecontrol class and loaded (.dll) in a page at runtime. I have added a scriptmanager in the master page and set EnablePageMethods to true, tried placing the webmethod function outside of the compositecontrol and in the page, still webmethod is not being called... Anyone has idea or solution to this problem of mine? Or another approach to retain the selected value of the dropdownlist inside this compositecontrol (.dll) that is being loaded in a page at runtime?
Can i run all validators when page is loaded. I need to show * in all input text fields that are necessary. I have require field validators for that fields, can i run it by default when page is loaded?
Is there anyway to capture the command the Gridview is executing for later use? I have gridview that uses parameters from a few textboxes, so its generating a custom statement. I am wondering is there anyway for me to get that statement either during or after it is executing it, and then returning the results. I need to save it, so that I can populate a CSV file with the data that was returned?
How do I output/log the sql being executed behind the scenes by the Entity Framework in an asp .net mvc application? In my case I'm using a Sql Server 2005 database.
I found this question Linq to Sql logging, but I'm trying to figure out how to do this with the entity framework v1 and asp .net mvc 1.0.
I am implementing a CustomAuthorizeAttribute. I need to get the name of the action being executed. How can i get the name of current action name getting executed in the AuthorizeCore function which i am overriding?
I have an .aspx page. I populate a public variable in the code behind (.cs) page and then access that variable in JS on client side. I have the script declared after the FORM tag as below.
<body> <form> ... </form> <script language="javascript" type="text/javascript"> debugger; var data = "<%=cSharpData%>"; </script> </body>
After postback this script does not get executed first time, but when I click on any other server button on the page, then it gets executed.
I'm new to web development so I'm not sure what's the best option for the problem that I'm having.Basically I have a web application that calls a web service for processing some data.This process may take a long time (hours) and I would to know if there is an easy way to send some status information to the client from time to time.Right now, the client makes the request from the browser and it just waits there until it finishes. How can I send some information from the web service? I would like to send a percentage and some additional text specifying what is being done.
My ASP.NET MVC web app has a weird issue. In VS debugging mode it works as expected, but when I publish it to dedicated web server (windows 2003, IIS6) a sql query returns previous data even though underlying data was already updated through the same connection. It looks like as if a query returns cached data. What might be the problem?
Should I just write to file before a stored procedure is executed or should I log the stored procedure into a table? If the latter one is recommended, how should I go about doing that?