I have a Web Form page that is called Search.aspx. I need to render the form in other places so I'd like to convert the Web Form to a User Control, but my Search.aspx.cs inherits a custom Page class which inherits System.Web.UI.Page. Since I C# doesn't support multiple inheritance, I'm unable to inherit both my custom Page class and Sy...
I have code like the following in a UserControl:
Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
If someCondition Then
childControl.Enabled = false
End If
MyBase.Render(writer)
End Sub
Whenever someCondition is true and childControl.Enabled is set to false during the Render event, the ...
Our ASP.NET WebForms MasterPage is making a muck of our meta data and title. If you go to http://beta.orcsweb.com you will notice our meta tags don't have line breaks and the proper formatting, and the title tag has added in line-breaks. Even though we setup our MasterPage file with the proper formatting ASP.NET makes a big mess of it.
...
I need to tweak the web interface of an in-house print system, but it's going on a decade since I touched HTML. Could anyone recommend some tutorials on writing HTML forms and processing them in PHP? Google only gets me eight-year-old resources with big "for historical purposes only" banners on top, possibly because all my vocabulary is ...
Given this class
public partial class Default : Page
{
private IRepository repo;
...
}
I want to find and set the private repo field. Is that possible?
UPDATE
I tried using the GetFields(BindingFlags.NonPublic), it returns {System.Reflection.FieldInfo[0]}.
UPDATE II
I tried using the GetFields(BindingFlags.NonPublic | Bin...
I'm using Ninject 2.0 in an asp.net app which is mvc and has web forms.
This seems to be causing a problem with my Application class, as it inherits NinjectHttpApplication from Ninject.Web.Mvc
But my master page is expecting a NinjectHttpApplication from Ninject.Web.
Has anyone got mixed apps working with Ninject 2.0?
...
I seem to have an issue with using jQuery to do a PostBack.
I can post back no problems but non of my page control values are there.
The code is like this;
WebForm.aspx;
<script src="/jQueryPlugins/jQuery.Form.js" type="text/javascript"></script>
<form id="myForm" action="MyForm.aspx" method="post">
<input type="text"...
I'm a little worried about posting information via jQuery. In particular when, in WebForms, I do a call to a WebMethod within my form I can obviously intercept the call and data.
Is there any way to secure this communication or is it a case of write your services in such a manner that they can't be used against you?
If it's the latter...
I was wondering if anyone knew if it were possible to override the default behaviour of browsers that support the new HTML input types such as type="email" and type="date"?
I appreciate that I could test if a browser supports an input type and provide a fallback for those browsers that don't, but what I want to know is is there any way ...
I am trying to make a WebForms project and ASP.NET MVC per this question. One of the things I've done to make that happen is that I added a namespaces node to the WebForms web.config:
<pages styleSheetTheme="Default">
...
<namespaces>
<add namespace="System.Web.Mvc"/>
<add namespace="System.Web.Mvc.Ajax"/>
<add namespac...
I'm trying to log in to a website and save an HTML page automatically (I want to be able to do this on a regular time interval). From the surface, this is a typical modern website where, if the user navigates directly to a "locked" URL, a log-in form pops up, and after logging in, the user is redirected to the intended page.
I gave mech...
I've always communicated required form fields on web applications to users by hanging an asterisk off the end of the control or the label and having a little sentence along the lines of "required fields are flagged with an asterisk(*)" or similar message at the head of the form so that they know what's what before they start filling it i...
In the current MVC project I'm working on, I need to be able to create something exactly like the GridView from asp.net webforms. I'm actually using FubuMVC, but I can adapt any Asp.net MVC solution to the Fubu framework.
I want to create something that has the same kind of functionality as the GridView. To explain further, I mean I w...
I found this forum thread in google, but no one here seems to encounter the same problem, so I would like to know if onsubmit='return false;' really fails in some IE7 browsers, meaning that it has become an unreliable method of preventing direct post back in an ajax form since the release of IE7, so we need to be very careful about using...
EDIT 2:
After writing up an incredibly long explanation in more detail I, of course, discovered my problem and it had nothing to do with the question I asked.
It was caused because I was creating a custom object of mine, assigning an uploaded images name to it's "LogoName" property...then creating a new version later in code, not assigni...
Well the title isn't very descriptive but I'm not exactly sure how to explain but here goes!
I have a web application (can use either MVC or standard web forms) which a user signs in to. If the user has signed up for more than one product they will have the option to switch between them. For the sakes of this example lets say User1 sig...
I am writing a drupal module that involves a form with many checkboxes. E.g.
$form['myform_checkboxes'] = array('#type' => 'checkboxes', ...)
I have made the key for these checkboxes numeric, starting with 0. E.g.
$form['myform_checkboxes']['#options'][0] = '0:00';
$form['myform_checkboxes']['#options'][1] = '1:00';
Upon implementi...
How can I clear the value of an asp:HiddenField control when the user hits the refresh button in the browser?
...
Hi Experts,
I am working on a webform project, where I want to implement MVP Pattern.
I have gone through few articles and project based on MVP. It seems fine to me.
At most of the places, If there is any need to display error message, it has been made
a method in the view interface. I am giving an example here for clarity.
public i...
I developed a webpage in which I used the following code to move the selected items between two list boxes.
It is very slow.
Is there any optimization for this?
protected void MovetoNext_Click(object sender, EventArgs e)
{
try
{
for (int i = 0; i < lstCategory.Items.Count; i++)
{
if (lstCategory.Ite...