Web Forms :: 1.1 - Simple Class Doesn't Work
Mar 19, 2011
Why the following code (asp.net 1.1) does not work?
//call.aspx
<script runat="server">
namespace DOTNETMath {
void Page_Load( Object s, EventArgs e )
{
ConstClass.DisplayEmployee("Testing");
}
}
</script>
//commonFunction.cs
namespace DOTNETMath {
Public Class ConstClass {
Public Shared Function DisplayEmployee(String x) {
Return x + " Hello ";
}
}
}
View 14 Replies
Similar Messages:
Mar 6, 2010
The following 'hello world' webservice works fine on my computer (VS2008) but I can't get it to work on the server--either from an aspx page (below) or when invoked directly. I get '404 page not found' on the direct invocation.
[Code]....
I added the HttpGet and HttpPost to test the web service directly on the server. I can open the page and invoke it, but then get the 404 page not found response.
View 5 Replies
Feb 26, 2010
I have records with and without a email entered in the field called 'email'.
This one works:
Return From p In db.myTable _
Where p.Email.Length > 0 _
Select New With {.p.Name, p.Email}
but this doesn't
Return From p In db.myTable _
Where p.Email.Length = 0 _ ( nor does Where NOT p.Email.Length > 0 )
Select New With {.p.Name, p.Email}
Am I missing something?
View 2 Replies
Dec 29, 2010
I have a menu (linked to a sitemap) wrapped in to a panel surrounded by a round control extender. The menu has StaticMenuItemStyle, StaticHoverStyle and StaticSelectedStyle. The first 2 works like a charm but not the StaticSelectedStyle. On click of the menu item the screen is redirected to appropriate page, but the menu item cssclass is set back to StaticMenuItemStyle. The background of the menu items are images. I tried some of the solutions from other posts, but no use.
View 8 Replies
Dec 8, 2010
I am porting my simple Role Based Auth to ASP.NET. It requires this check on each page:
[Code]....
If put in each page's OnLoad, it works fine. But when I add it to the masterpage, it doesn't work. Is there something about the ServerVariables or Session Object that would prevent using those in a masterpage? Is it an issue calling my class from a materpage?
View 1 Replies
Nov 16, 2010
I'm unable to set Comments property of a MembershipUser type objects.
E.g.
MembershipUser mu = Membership.GetUser(username);
mu.Comment = "someComments";
I'd expect this to set the Comment property of mu object to "someComments" and write changes to the database.
Later, I do a following check:
mu.Comment == "someComments";
Comment property is set to null. Is there anythign that I need to change in a web.config or...?
View 2 Replies
Jun 8, 2010
just a quick question -i cant get my class in App_Code to work in my code behind page for simple .net page, some light what doing wrong?
[Code]....
View 7 Replies
Jun 16, 2010
I cannot seem to get the asp.net 2.0 tracing feature to work on even a simple website I have set the web config to:
<trace enabled="true" requestLimit="100" localOnly="false" traceMode="SortByCategory" writeToDiagnosticsTrace="true" />
However I cant even seem to get a hello world to print in the trace:
protected void Page_Load(object sender, EventArgs e)
{
System.Diagnostics.Trace.Write("hello world");
}
I am looking at trace.axd in the same directory as the page What am I doing wrong?
View 1 Replies
Feb 22, 2011
I am using a rich textbox in my website, i need to check the spelling in the content of richtextbox. That i need to implement the spell checking class to check the spelling. give me the idea or sample code to achieve this.
View 1 Replies
Mar 20, 2014
I am beginner in asp.net / vb.net and I developed a web application for inventory management. here I have my insertion procedure that I entered in my code behind all the different page of my application. My problem is the following:
* I would like to put my procedure in a class that I will call on my different page * how to create this class * how to call this class on my pages
here is my procedure:
Private Sub reqinsertion (ByVal sreq As String)
        Dim con As New System.Data.Odbc.OdbcConnection ("Dsn = dshealthboard")
        Sun ocommand As System.Data.Odbc.OdbcCommand
        con.Open ()
        ocommand = New System.Data.Odbc.OdbcCommand (sreq, con)
        ocommand.ExecuteNonQuery ()
        con.Close ()
    End Sub
View 1 Replies
Oct 7, 2010
i'm trying to make this work for several days but it just doesn't work.
this is my code:
aspx page:
[Code]....
webservice:
[Code]....
this was downloaded from this website.
the problem is that the page loads fine but no autocomplete occurs.
View 5 Replies
Jul 19, 2010
I saw some code written by another developer that looks something like this:
var stringBuilder = new StringBuilder();
if(stringBuilder == null)
{
// Log memory allocation error
// ...
return;
}
View 5 Replies
May 11, 2010
I am a new to WCF. I have written ajax to use a web service before, but on this project I am trying to use ajax to WCF.After I build the project and wcf using ajax, I receive the return successfully. But, 10 or more minutes later I don't get a return, the ajax calls the error function, and the fiddler returns nothing.
If I rebuild the project without any source modifying, I receive the return successfully again.
View 2 Replies
Nov 19, 2010
In my local enviroment it just works. Iam no IIS Admin so ....
i try the following
My domain "http://mysite.com/" goes to my url provided by my hosting service (discountasp.net)
I want that this url goes to the root/mysite/ virtual directory but i want that the url stays on "http://mysite.com/". So i defined the following rule, but it doesnt work for me.
here is my web.config that is placed in the root directory (generated by the IIS7 Remote Administration UI)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>[code]....
View 1 Replies
Aug 8, 2010
iam trying to make a web program that consist on marking days for vacation. my problem is this: when put the login and password and press the login button everything work great on vs2010. when i copy the prrogram to the iis 7 i put the username and password and when i press the login button nothing append. is like the button as no action.
View 5 Replies
Mar 17, 2010
The forms works fine in Firefox and I was able to get an email from it. Here is the code below:
Partial Class _Default
Inherits System.Web.UI.Page
''' <summary>
''' Actions when the Send button is clicked.
''' </summary>
'''
Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click
If Not Page.IsValid Then Exit Sub
'Create instance of main mail message class.
Dim mailMessage As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()
'Configure mail mesage
'Set the From address with user input
mailMessage.From = New System.Net.Mail.MailAddress(txtEmailAddress.Text.Trim()).........
View 2 Replies
Feb 24, 2010
what I want to do is: in one page, I got a navigation pane on the left and the content pane on the right. both of them are 100% height in the web page and both have its own scroll bar. However, I failed to set the height:100% although i've already set height:100% to html,body,div,table,tr,td. it just doesn;t work. if remove the "runat=server" from the form tag, it works fine. don't why~~~
Is it actually a bug of asp.net?
[Code]....
View 15 Replies
Mar 7, 2011
It seems my website doesn't accept some CssClass defined into my <asp:Menu>.Here is how I implemented it :
[Code]....
and here is my Style.css which works for everything else :
[Code]....
What I don't understand is that my .menuItems works perfectly good...For the "hover" style, if I try with ".menuItems:hover" it will work but I don't know why ".menuItemsHover" doesn't...What am I doing wrong with this code? I followed a lot of tutorial but no one seems to work...
View 5 Replies
Jan 12, 2010
I have a problem, when i´m working offline, my favicon appears, but when i put my web site online in a iis server, doesnt appear
i have this:
[Code]....
View 8 Replies
Dec 31, 2010
Why this doesn't work?
[Code]....
Error: The HTTP verb POST used to access path '/WEB_Salaries/Programs/CALC.EXE' is not allowed.
View 5 Replies
Jan 8, 2010
I have set the MaxLength in the textbox and don't know why I can type more than the max length characters in the textbox. Do you know why? ....
View 9 Replies
Jan 28, 2011
I have been usiing thr profile provider in a net2.0 application and it works fine. I am now working on a 4.0 project and the profile doesnt work. I have the aspnet_Profile table in SqlServer and I have the code in the config.
[Code]....
But I don't get a Profile.XXX in the intellisense? What am I missing?
View 2 Replies
Feb 8, 2011
The following is trimmed down from the web.config file I'm using in a website that runs in Windows 2003 R2.
<system.web>
<!-- Required to use BetterImageLink and BetterImage class -->
<httpHandlers>
<remove path="*.asmx" verb="*" />
[Code]....
I'm migrating the site to a new server running Windows 2008 R2. When I tested the site, I fould that the BetterImage control doesn't work. I use the BetterImage control liberally throughout the site, so this is a real problem for me. I emailed the developer and he responded that I have to change the location in the web.config where I register my custom handlers. How do I do that? And are there any other changes I need to be aware of? How different is the web.config between the two Windows versions?
View 1 Replies
Apr 20, 2010
I have an issue with my asp:Wizard, where basically I am calling the MoveTo function and it is not moving to the desired step. I have used the MoveTo function elsewhere in my wizard, but I only have the problem with this specific location.
[Code]....
In the above code, ValidateSelectModelStep() returns false, and so the block of code is entered. urchaseWizard.MoveTo(this.SelectModelStep) is called, and yet the Wizard just continues on to the YourDetailsStep. This however is not he case for the other steps. When the validation fails on the other steps, and purchaseWizard.MoveTo(currentStep) is called, the Wizard correctly goes to the current step and displays the errorText. What is really bizarre, is that if I change the step that we want to go to when ValidateSelectModelStep() fails, the Wizard will correctly go to the specified step. So it seems as though there is only the problem with when you are on the first step, trying to MoveTo the first step. Even more so, is the fact that if I try to call purchaseWizard.MoveTo(this.SelectModelStep) from some other step in the wizard, it correctly brings you to the first step. Note: In the first step I have a repeater, which for the validation I need to loop through all of the items and find if one is selected. My Validation function for that works fine, and the MoveTo function does get called. (I checked it through debugging) Does anyone have any ideas why this is happening and how to stop it so my validation restricts progression through the wizard correctly?
View 2 Replies
Sep 17, 2010
I wrote a statement such that
cmd ="select [title] from products where sku='% "3.5 caddy" %'"
this statement wont return anyfin where there is products with titles startin with 3.5 or ending with caddy or containing 3.5 caddy but just not together for example there is this title "3.5" IDE to USB 2.0 Aluminum External Silver HDD Enclosure Caddy" and that search of 3.5 caddy wont pick this item up as 3.5 is at the start and caddy is at the end.
View 1 Replies