asp.net

Continuously update an ASP.NET page using AJAX

I have an ASP.NET page that is interacting with a business class. I want to continuously update controls on my page based on user entered values, e.g. update totals. The calculations are embedded in business logic but they're simple enough to reproduce elsewhere. I've thought of three ways to accomplish this: Dynamically update the pag...

silverlight error - the opreation is not supported for a relative uri

Hello All, I've just started developing silverlight applications. I've created a webserivce in my asp.net project. Now, when I try to connect to it through my silverlight project I receive the following error: "the opreation is not supported for a relative uri" I am using the following url --> http://192.168.1.2/MyWebsite/SubVersioned...

Custom Menu / Context Menu Mouse Over or Right Click

I currently have an ASP.NET GridView that displays a few columns to the user with one of them being a link to view the details for the specific record. From the details page, the user has the ability to access other pages for adding new records (for example from the contact record page, you can click a link to add a new vehicle purchase...

Handle client events in Asp.net AJAX

I have an Asp.net AJAX control and in client control class I want to handle the onFocus event for some textboxes in my control. I would like to have only one handler for all the textboxes, however in the handler I don't know how to get the source element that caused the focus event. In my initialize function I will have the following c...

The name 'controlname' does not exist in the current context

I have a web application that I'm working on (ASP.NET2.0 with C#, using VS2005). Everything was working fine, and all of a sudden I get the error: Error 1 The name 'Label1' does not exist in the current context and 43 others of the sort for each time that I used a control in my codebehind of the page. This is only happening for 1 p...

ASP.NET enter key and form submit with no javascript

I have a form that I want to submit when the user presses the enter key. It works fine in Firefox, but not in IE. It is basically the same issue as this, except that I am not allowed to use any JavaScript: http://stackoverflow.com/questions/270494/enter-button-does-not-submit-form-ie-only-asp-net Unfortunately it looks like ASP.NET uses...

What do you do if your error logging fails, and how do you test that its working in production?

What do you do if you're error logging code fails? How do you make sure that its currently working? How do you know if its not working? How do you test that its working in a production environment? Should I throw an exception if all else fails? The code below uses Microsoft's Enterprise Library Logging Application Block. How do you m...

ASP.NET 2.0 - Need to programmatically click a link

Is there a way to click a link programatically, so that it has the same effects as if the user clicked on it? Example: I have an ASP.NET LinkButton: <asp:LinkButton id="lnkExport" runat="server" CssClass="navclass">Export</asp:LinkButton> I have a link on a sidebar directing to the .aspx page that has this linkbutton on it. For vari...

Asp.Net Gridview Buttonfield get Row Data

I have a Gridview which is binded to a datatable that I created. The data in the table is ever changing. I added a buttonfield to the Gridview. When clicked I want to send a specific columns value in that row through a link or sent through a function. How do you go about doing this? ...

ASP.Net Problem in Prod/Dev

I am facing strange problem, Whenever I commented second if condition, it works in Production, but fail in development. And when I dont comments second if condtion of code, it works for development and fail for production. protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) {...

ASP.NET MVC posting with Ajax.BeginForm returns blank view

I have a page that contains multiple inputs - I'm using Ajax.BeginForm to build a form for each set of inputs. <% using (Ajax.BeginForm(new AjaxOptions() { InsertionMode = InsertionMode.InsertAfter, HttpMethod = "POST" })) { %> <input class="smallInput" type="text" name="duration"/> <input type="submit" value="Add" /> <% } ...

How to create a typed dataset via the designer

Hi, I need to create a typed dataset using vs.net 2008. It is not based on a database table. ...

Set boundcolumn width in gridview isn't working

I have a report page that can display two different reports. So I have a GridView with no columns on my aspx page. I am adding 4 BoundFields to the GridView in the button click event handler. The first column is the one I need to set the width of for one of the reports (the code I'm using to add this column is below). gvReport.Colu...

Convert.FromBase64String()

Hello, Q1 - If character ‘C’ is saved into viewstate, then just before the page is rendered,Asp.Net serializes ‘C’(along with other data) into Base64 string. If on postback I issue the following code: protected void Page_Load(object sender, EventArgs e) { TextBox1.Text = "ABCDEF"; if (IsPostBack) { string v...

ASP.NET Server.Execute

I'm having some problems with Server.Execute that I can't seem to find any details on. Page page = new WidgetProcessor(Widget); Server.Execute(page, htmlTextWriter, true); The Widget in the above code is a simple object that knows how to instantiate a usercontrol. The WidgetProcessor takes a Widget and adds the widgets control to the...

What's your typical structure of an ASP.NET solution?

As the title says, I'm interested to know how you typically structure your ASP.NET solutions. I'm especially interested in ASP.NET WebSite solutions, but information abut other types (WebApplication, MVC) might be interesting as well. Some specific questions: what/how many projects/assemblies does the solution contain how do you name...

Using ASP.NET Session for Lifetime Management (Unity)

I am considering using Unity to manage the lifetime of a custom user class instance. I am planning on extending the LifetimeManager with a custom ASP.NET session manager. What I want to be able to do is store and retrieve the currently logged in user object from my custom classes, and have Unity get the instance of User from the sessio...

ASP.Net ReportViewer causes flickering in Firefox.

In the HTML generated by the ReportViewer there is the following line of code (I've tried ot make it more readable by removing the superfluous information) setTimeout("frames['ReportViewer1TouchSession0'].location.replace('/Reserved.ReportViewerWebControl.axd?...&TimerMethod=KeepAliveMethodReportViewer1TouchSession0...", 0); function K...

Asp.Net AlertBox code behind page???

I have a buttonfield in a gridview. When the button is clicked the RowCommand function gets called. I need to pop up an alert box to make the user confirm their choice. I am pretty sure there is an HtmlInputButton involved but I kind of just need the syntax. After that, how do you know whether they confirmed? ...

How efficient is Microsoft's ASP.NET Ajax ?

Are there any studies out there about efficiency of Microsoft's ASP.NET Ajax? ...