asp.net

Trace Host of a SOAP Request

The software my company uses has a web service which signature is more or less like this: [WebMethod] public DataSet MakeQuery(string sql) { } NOTE 1: I don't have the code for this. Recently, we noted the Sql Server gets a lot of processes without dying, so I want to trace the input of this webMethod. Is any way I can do this? I...

Asp.net GridView - how to access datasource before data is bound?

I'm trying to access datasource before I bind it to grid. How do I do that? My guess I should look in one of the events like Grid.DataBinding ...

ASP Net - Forms Authentication with Active Directory Problem

I have an error... The container specified in the connection string does not exist Basically, I am using Active Directory authentication in ASP.NET. I have set up my connection string. I am still very new to AD. I appritate any help thanks ...

Viewing files in a remote FTP folder from a webpart

Hi there, We're looking to integrate a file/folder view of a FTP share in a SharePoint portal. We recon the best solution would be to create a webpart that reads the contents of the FTP share and displays it in the portal. Is there any third party solutions for this? Has anyone done anything like this before.. and might be able to giv...

Is it possible to implement a self-updating ASP.NET web application?

Wordpress has the capability to update itself (on admin user's request). Is it possible to implement something similar using ASP.NET? I can see web.config and bin folder causing problems. ...

.NET 3.5 missing from the ASP.NET drop down in IIS after new install

I have just installed the .NET 3.5 Framework to my Windows 2003 server and when I try to create a new website I can't select 3.5 from the web site properties ASP.NET tab in IIS. This works fine with 1.0, 1.1, and 2.0. I know the framework install process was completely different with 3.5, but I assume it should be available in the drop...

What does an "Unable to validate data" exception in System.Web.Configuration.MachineKeySection.GetDecodedData indicate

I've developed a website testing on localhost Cassini and it has always run fine, now when I deploy to my webserver I intermittently get the following error: Global.Application_Error Error: Exception occurred during request: http://....blah.aspx Unable to validate data. at System.Web.Configuration.MachineKeySection.GetDecodedData(Byt...

Asp.net Datasource - view sql data by lookin at datasource object?

Is there a way to view data that is returned from db by looking at DataSource or DataSourceView object in codebehind? I'm trying to view DataSourceView in debug but I don't see the data returned. ...

Assigning datasource during databinding event

I've been playing around with assigning an ASP.NET WebControl's DataSource when I'm handling its DataBinding event. For general data binding logic in my pages, it seems to work well in organizing things. What arguments are there for not doing this? ...

Finding the referring url that brought a user to my site

Duplicate: Finding previous page Url How do I find the referring url that brought a user to my site in ASP.NET? See Also: How can I find what search terms (if any) brought a user to my site? ...

Select a Variable TimeSpan with an Arbitrary End point

I've been working on a Stored Procedure that checks the time, then retrieves records going back over the last full 24 hour period between 8am and the previous 8am. So, for instance, assume that it's currently 10am. The stored procedure looks at the current time, notes that it is past 8am, and sets the query to run backwards 24 hours, f...

ASP.NET Request - Can I get a posted file from a dynamic control created on client?

Hello, I have a web control with some custom javascript. The javascript creates new file upload controls on the client dynamically using code similar to: var newFileUpload = document.createElement('input'); newFileUpload.type = 'file'; container.appendChild(newFileUpload); // where container is a div This exists in an ASP.NET form wi...

Minimize ViewState with TreeView

Any practical tips/tricks on how to do that? It doesn't seem that there is a lot of information about how to do that. I am loading data from the database into TreeView and the max number of nodes will be around 100. I am still interested in minimizing the ViewState. I will also be adding and deleting nodes dynamically (though the user...

Is it possible to catch missing event handlers at compilation?

Is there any way to cause a compilation error if an ASP.NET control declares an event handler that is not implemented? For example, I declared a TextBox <asp:TextBox ID="uxFeeQty" runat="server" MaxLength="2" Columns="2" AutoPostBack="true" OnTextChanged="ReCalculateFees" style="text-align:right;" /> but neglected to im...

Custom Validators and Page.IsValid

I know that if you instantiate and asp:CustomValidator control, you in most cases need to check for IsValid in the custom validator function if you want to respect other validators on the page. However, if you write you own Custom Validator, inherit from BaseValidator or RequiredFieldValidator, I don't see any way to check for IsValid ...

Sorting by foreign key values in GridView with Entity Framework?

When using GridView's built in Sorting with Entity Framework, I can display foreign key values. For example... <asp:boundfield HeaderText="Category" DataField="Category.Name" SortExpression="Category.Name" /> ...but when the header is clicked to sort the items in the grid, how can I sort my List list by Category.Name? I only have th...

asp.net HyperLinkField Has no ToolTip property (Alt text)

I wish there was a ToolTip field in HyperLinkField as there is one in HyperLink. I'm creating a HyperLinkField by code before binding to my data source: HyperLinkField hl = new HyperLinkField(); hl.DataNavigateUrlFields = new string[] { "col" }; hl.DataNavigateUrlFormatString = "{0}"; hl.DataTextField = "Foo"; Is there any way to als...

How to create a report in BusinessObjects and bind to xml data?

I am trying to create a report in Business Objects using Desktop Intelligence tool (version XI Release 2 on Windows XP). I selected xml data provider and pointed to an xml file. From my Asp.Net web application, I need to bind this report to some xml data which has the same schema. Is there any document or sample .Net source code which c...

How To Make A Web User Control's Child Control's Events Cause A Catchall Event To Fire On The Parent Once Per Postback

Say that I have a web user control that has several drop down lists in it. They are all set to AutoPostBack = true, BUT each SelectedIndexChanged event handler in my control will fire/chain the other SelectedIndexChanged handlers I have defined for the other DDLs. This means that when the user changes a single DDL, the event handlers are...

HttpContext.Current represents the current context of a user... what is meant by current context?

HttpContext.Current returns an IPrincipal object that represents security context of the current user. I understand principal object combines the identity of a user with other information, such as roles, privileges etc. But why do we say it represents the current context of the user? Why not just say it represent a user? Is there a part...