C
C#•15mo ago
Mr.Mal

No link between aspx file and aspx.cs .Net framework 4.7.2

Hello everyone first post on this server. Sorry to bother you but impossible to make the link between the 2 pages even with the help of all the Stack Overflow topics that talk about the problem. MGBasePage inherits from System.Web.UI.Page Thanks in advance for your help
37 Replies
Mr.Mal
Mr.MalOP•15mo ago
nobody for me 🥲
Kouhai
Kouhai•15mo ago
Are you getting a build error?
Mr.Mal
Mr.MalOP•15mo ago
hi, yes not invalible in the current context with all id define in the aspx file
Kouhai
Kouhai•15mo ago
Can you show the error think ?
Mr.Mal
Mr.MalOP•15mo ago
yes I will
Mr.Mal
Mr.MalOP•15mo ago
Mr.Mal
Mr.MalOP•15mo ago
sorry to have taken so long
Kouhai
Kouhai•15mo ago
So how did you create the aspx page file? Was is already created and you renamed it? @Mr.Mal
Mr.Mal
Mr.MalOP•15mo ago
No I take this project
Kouhai
Kouhai•15mo ago
Also check your csproj file does it have entries like this?
<Compile Include="HttpDocs\BackOffice\adminCity.aspx.cs">
<DependentUpon>adminCity.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HttpDocs\BackOffice\adminCity.aspx.designer.cs">
<DependentUpon>adminCity.aspx</DependentUpon>
</Compile>
<Compile Include="HttpDocs\BackOffice\adminCity.aspx.cs">
<DependentUpon>adminCity.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HttpDocs\BackOffice\adminCity.aspx.designer.cs">
<DependentUpon>adminCity.aspx</DependentUpon>
</Compile>
Mr.Mal
Mr.MalOP•15mo ago
I look no I don't have any file like that It would be at the root of the project ?
Kouhai
Kouhai•15mo ago
Yes it's the project file (.csproj)
Mr.Mal
Mr.MalOP•15mo ago
nothing but neither is it on the server hosting the site (which is stable).
Kouhai
Kouhai•15mo ago
How did you open the project in visual studio?
Mr.Mal
Mr.MalOP•15mo ago
I create a « asp.net web app(.net framework) : empty » and I paste all files I take all references and lib with error code through build error That’s all
Kouhai
Kouhai•15mo ago
Yeah that won't work Why did you copy the files and paste them in another project?
Mr.Mal
Mr.MalOP•15mo ago
I took all files by FTP The website was already deployed
Kouhai
Kouhai•15mo ago
You should copy ALL the files Including csproj, resx Basically get the whole project/solution from the FTP server into your local machine
Mr.Mal
Mr.MalOP•15mo ago
The coding instructions says to setup an IIS environment and copy the database and the files download by FTP
Kouhai
Kouhai•15mo ago
Yes, the FTP should have all files including csproj, which is the project file Can you check if you've copeid .csproj files or not?
Mr.Mal
Mr.MalOP•15mo ago
Yes i will, thx for your help 😭
Kouhai
Kouhai•15mo ago
Np! hyperNODDERS
Mr.Mal
Mr.MalOP•15mo ago
No, I scrap all files on the serveur by ftp and nothing
Kouhai
Kouhai•15mo ago
Weird, so you just have cs files?
Mr.Mal
Mr.MalOP•15mo ago
Yes, if you see something strange on this mail
Mr.Mal
Mr.MalOP•15mo ago
Mr.Mal
Mr.MalOP•15mo ago
It was the instructions give by the platform Not just the cs files, this files too
Mr.Mal
Mr.MalOP•15mo ago
Kouhai
Kouhai•15mo ago
I guess the best you can do is manually right click on aspx files in visual studio and click Convert to Web Application This should add the designer files I think
Mr.Mal
Mr.MalOP•15mo ago
But I have hundreds of files
Kouhai
Kouhai•15mo ago
NOOO not sure if "Add existing file" would generate the designer files or not But you could try it
Mr.Mal
Mr.MalOP•15mo ago
and I don't have this with a right click...
Kouhai
Kouhai•15mo ago
try "Add existing"
Mr.Mal
Mr.MalOP•15mo ago
ok it's good but same error I have to solve this error before
Kouhai
Kouhai•15mo ago
I still have no clue how you're using the project You have to have a csproj file
Mr.Mal
Mr.MalOP•15mo ago
ok thx by the way I will try tomorrow to send an other help request Thank you so much for your time and your help. I'm going to bed now, it's past 1 in the morning at my place. I hope to be able to return the favor one day. bye bye
Kouhai
Kouhai•15mo ago
Np, happy to happybear
Want results from more Discord servers?
Add your server