asp.net

ASP.NET - Render a custom CompositeControl to String?

I am trying to render a composite control to a string and write it to the page as such: Dim sb As New StringBuilder Dim sw As New StringWriter(sb) Dim hw As New HtmlTextWriter(sw) Dim CustomCompositeControl as New MyCustomCompositeControl CustomCompositeControl.RenderControl(hw) HttpContext.Current.Response.Write(sb.ToString) Unfortun...

How to stop Gridview encoding my text on edit

Hi All, I tried to ask this question previously howver I did not recieve the correct response. I am using a GridView in the admin area of site I have designed. I use a DetailsView to insert data into the database, and the Gridview to edit and delete the data. My query is: When I add data in the DetailsView I enter data like this: "PR M...

Mono 2.4, AutoHosting and MVC

Can mod_mono's AutoHosting be modified to support ASP.NET? ATM it doesn't really work: Link. / works, but the runtime ignores Global.asax altogether and doesn't follow the routing conventions. ...

File Upload of more than 4GB

Hi, I wish to create an ASP.NET web application that allows upload of files up to a size of 4GB. How can I achieve that? I would prefer something like a "Download" manager where I can resume, pause etc... Is that possible? If so, where should I start? I think asp.net has a limit of 4mb upload or something? I am not too sure.. Plea...

Steps for PostBack

I come to you this time with a question to do with .NET. I was given the challenge of finding out the four steps involved with postback. The exact challenge is: "There are four methods executed each time there is a postback. Describe and identify each." From what I can tell (this is a challenge for a .NET class), postback is what oc...

Inserting with asp:ListView inside asp:FormView

I have a asp:listview which uses the SelectedValue of the FormView. I have editing working with the listview fine, and insert will insert a record but it doesnt insert the SelectedValue of the parent FormView... What am I missing? ...

Bind GridView via jQuery ajax

I am new to jQuery, trying to populate a GridView or Telerik RadGrid using jQuery. Not sure how to go about it and unable to find any examples. Any help is appreciated. Thanks. Essentially I am trying to display a modal window with a textbox and button. The user enters a search criteria presses the button and a gridview in the same moda...

Insert record with EmptyDataTemplate in asp:ListView

I have an EmptyDataTemplate in my asp:ListView which I want to use to insert a new record. I have Inserting working in the InsertItemTemplate... I thought I could copy the InsertItemTemplate into the EmptyDataTemplate, on clicking Insert this gives the error Insert can only be called on an insert item. Ensure only the InsertTemplate h...

.Net Changes the element IDs

Hi, .Net is kindly changing the element ids on my pages by appending a ct100_ to them. As much as I appreciate microsoft trying to help me keep from duplicating ids on my site, I think I can manage it on my own. Can anyone tell me how to prevent this? Thanks in advance. ...

Classic ASP: posting with content of PDF file to a .NET page

So the problem is half the app is written in classic asp and half is in asp.net. There's a PDF file (in memory) that is generated by classic asp code that I need to share with the .NET half. I thought of saving the PDF to the FS or DB, which I am pretty sure most of you wouldn't recommend because it would need to go through a very slow p...

Why is this error happening a lot "asp.net, sql server"?

I have this error which happen many times on my site: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error:...

Why don't PreSendRequestHeaders and PreSendRequestContent run consistently?

When working with HTTP modules, has anyone noticed that the final two events in the pipeline -- PreSendRequestHeaders and PreSendRequestContent -- don't always run? I've verified that code bound to EndRequest will run, but will not when bound to either PreSendRequestHeaders or PreSendRequestContent. Is there a reason why? I thought pe...

ASP.Net session value not changing

I have 2 pages. .#1 page: session("X") receives value from user input (textbox), redirects to #2 page. .#2 page: displays the value of session("X") to user, if user wants to change the value, redirects back to #1 page for editing. .#1 page: session("X") loads into original textbox for user to change. Value from textbox is again placed...

asp.net someusercontrol_ascx is defined in multiple places error

I've had this intermittent issue when using asp.net. My site is dynamically compiled. Sometimes when I modify a user control my web site complains that it is defined in multiple places. It almost seems like the old control did not get removed from the asp.net temporary files and the updated control is compiled to the same directory s...

Creating a URL in the controller .NET MVC

I need to be able to construct a link in the Action on the controller to send an email. What is best practice to do this? I don't want to construct it myself in case my routes change. Should I have a view for each email and render that and send it? That might be a good way of doing it. ...

Why does Response.Redirect("") Return an Error in One Test Environment and Not Another?

We're trying to figure out how to fix a bug found in 3rd party IV&V testing, which we can't recreate in our internal test environment. We've determined that the bug is caused by a URL value being inadvertently set to an empty string ("") before attempting to redirect to it. Hence, we're trying to execute Response.Redirect(""). In the ...

Company doesn't want to use ASP.NET ajax...what can I do?

Developers and management tell me that they want to move away from using asp.net ajax because it is big and cumbersome. I kind of agree, but I don't want to do all the javascript heavy lifting myself. Eventually I also want to introduce jQuery. I'm guessing right now it will also be a problem. Is there a good post somewhere outlining...

Umbraco Yay or Nay?

I'm looking more towards CMS's as I'd like my clients to be able to be as self sufficient as possible. Anyhow, I'm just starting to evaluate and will update this with my conclusions. However, since I'm starting with evaluating Umbraco first, I'd like to get a consensus. I have no preference for C# or Vb.Net. so I'm open to either. ...

Application Variable in SQLDataSource control parameter

Perhaps this is laziness on my part, but in the same way I can reference a connection string from my web.config using <%$ ConnectionStrings:con %>, I'd like to do similar referencing an Application variable in one of my select parameters. Something like: <asp:Parameter Name="AppVal" Type="Int32" DefaultValue="<% Application['MyVal'] %>...

UserControl Textbox Won't Maintain State

I have a very simple usercontrol, basically a textbox and a label, whose purpose is to toggle between one another. The control is bound during the page's Page_Load event. On the UserControl's Page_Load event, I call the Toggle() function, which shows or hides the appropriate control and sets its text based on a boolean Editable property ...