Well, my goal is to associate a .cs code behind page to an .aspx page. When I put only CodeBehind="W_AccueilD.aspx" without inherits, the functions as Click doesn't operationals.
Perhaps, you know a method to associate .cs page to .aspx page ?
According to your description and code, maybe you create W_AccueilD page, then generate W_AccueilD.aspx.cs automatically, i think your code is generate automatically, so it should work.
Also you could check this tutorial about how to associate the page.aspx and page.aspx.cs:
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
60 Points
217 Posts
Calling a c# code page on a .aspx page
Jan 23, 2018 05:20 PM|Rednuts72|LINK
Hello,
I set the problem of calling a c# code page on a .aspx page.
I've got the error's message : Message d'erreur de l'analyseur: Impossible de charger le type 'TestPro_20180123.W_AccueilD'.
The script is :
<%@ Page Language="C#" CodeBehind="W_AccueilD.aspx.cs" AutoEventWireUp="true" Inherits="TestPro_20180123.W_AccueilD" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
namespace TestPro_20180123
{
public partial class W_AccueilD : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
} } }
Trust and peace !
Contributor
2155 Points
2142 Posts
Re: Calling a c# code page on a .aspx page
Jan 23, 2018 08:04 PM|march11|LINK
I think you have some confusion here.
This part in bold
<%@ Page Language="C#" CodeBehind="W_AccueilD.aspx.cs"
tells the aspx page hoe to locate the code behind C# code.
What is you are trying to do?
Member
60 Points
217 Posts
Re: Calling a c# code page on a .aspx page
Jan 24, 2018 11:32 AM|Rednuts72|LINK
Hello,
Well, my goal is to associate a .cs code behind page to an .aspx page. When I put only CodeBehind="W_AccueilD.aspx" without inherits, the functions as Click doesn't operationals.
Perhaps, you know a method to associate .cs page to .aspx page ?
Thanks, god with trust !
Marc-Antoine
Contributor
6730 Points
2715 Posts
Re: Calling a c# code page on a .aspx page
Jan 25, 2018 02:45 AM|Eric Du|LINK
Hi Rednuts72,
According to your description and code, maybe you create W_AccueilD page, then generate W_AccueilD.aspx.cs automatically, i think your code is generate automatically, so it should work.
Also you could check this tutorial about how to associate the page.aspx and page.aspx.cs:
How to add code behind file to existing page:
https://blogs.msdn.microsoft.com/mikhailarkhipov/2006/04/13/how-to-add-code-behind-file-to-existing-page/
Best Regards,
Eric Du
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
60 Points
217 Posts
Re: Calling a c# code page on a .aspx page
Jan 25, 2018 09:23 AM|Rednuts72|LINK
Hello Eric Du,
Good to your answer, I charge the header parameters of .aspx page and the files code behind is associated to the .aspx page.
Have a nice day !
Rednuts72