Showing posts with label codebehind. Show all posts
Showing posts with label codebehind. Show all posts

Thursday, March 29, 2012

Please correct my @ Page directive for codebehind asp.net

I have a vbproject called myvbproject, in that i created a class called class1.

I build the solution to it, and it created the class1.dll in its bin directory.

Now, i want to use that class1.dll in my asp.net projects web form.

I am writing the following in my asp.net webform1: It is not working: Can you please correct my @dotnet.itags.org.page directive code.

<%@dotnet.itags.org. Page language="VB" Codebehind="class1" AutoEventWireup="false" Inherits="myvbproject.class1" %

Thank you very much for the help.To use class1 from compiled assembly class1.ddl you should not alter your page directive. Add reference to class1.dll, declare variable and use it.

Wednesday, March 21, 2012

please help i my code

i cannot navigate to the page i specify, why?

<%@dotnet.itags.org. Control Language="vb" AutoEventWireup="false" Codebehind="Search.ascx.vb" Inherits="SilentBookShop.Search" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<FORM method="post" id="frmSearch" name="frmSearch" action="../WebForm1.aspx">
<TABLE id="Table1" style="WIDTH: 174px; HEIGHT: 90px" cellSpacing="1" cellPadding="1" width="174" align="left" bgColor="#6666ff" border="0">
<TR>
<TD style="COLOR: white; FONT-STYLE: italic; HEIGHT: 15px" align="middle" bgColor="#993300" colSpan="1" rowSpan="1">Search</TD>
</TR>
<TR>
<TD style="HEIGHT: 33px"><SELECT style="WIDTH: 133px">
<OPTION value="" selected>--</OPTION>
<OPTION value="Keyword">Keyword</OPTION>
<OPTION value="Title">Title</OPTION>
<OPTION value="Author">Author</OPTION>
<OPTION value="ISBN">ISBN</OPTION>
</SELECT></TD>
</TR>
<TR>
<TD>
<INPUT style="WIDTH: 132px" type="text" id="searchString" name="searchString">
<INPUT style="WIDTH: 30px; HEIGHT: 22px" type="submit" value="GO"></TD>
</TR>
</TABLE>
</FORM
wen i click at the button, it stays on the same page, it won't go to the page i want.

Thanks!It looks like you're missing some "runat=server" attributes in your elements. This could be contributing to the problem.
Hi,

Because the page that you're going to put your control in already has a form and you can't nest forms.
You should use an asp:button, and Redirect or Transfer from the button's click event.
Alternately, your button's client-side click event could set the action of document.forms[0] to ../WebForm1.aspx and submit.
Let me know if this helps.

Please help me

My codebehind file (.aspx.cs) will not load. When I post my web application everything works except the actual code in the .cs file. I mean that when tou press the button it will not execute the code.

If anyone can help me, please do!

Thanks!

the button have runat=server?

Hello,

Is the page being refreshed (postback)?

If yes then go to your code and double click on the button to create the event handler again, then recompile.

If not then tell me to help you sorting that out.

regards


fastlearner wrote:

My codebehind file (.aspx.cs) will not load. When I post my web application everything works except the actual code in the .cs file. I mean that when tou press the button it will not execute the code.

If anyone can help me, please do!

Thanks!

Have you fully compiled your project and deployed the bin directory to your web server?


The page is not beeing refreshed!

The .cs file is probably not beeing loaded at all by the compiler, or second .dll doesn't inherit from the first.

Thanks.


Hello,

1) Try to run your application in different browser (FireFox)

2) execute this C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -c

regards


Thanks for all your help.

It seems my problem was an improper configuration of the IIS to use ASP.net

Regards


What was the problem? and what you did to solve it?

regards