Codebehind - > SRC? [英] Codebehind -> Src?

查看:53
本文介绍了Codebehind - > SRC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我只是初学者,我在我的

asp.net应用程序中使用c#-codebehind ....

我该怎样做才能使我的申请工作没有代码隐藏(在bin文件夹中没有

dll.-s)?

我正在搜索关于Src而不是Codebehind的内容(在@page

指令)但我不知道从哪里开始...


请帮助,


提前谢谢,


Krunom。

解决方案




你需要写下您可能在代码隐藏文件中编写的所有代码,

直接写入HTML代码区域。

类似于您在页面上编写的java脚本。


regds,


" Krunom Ancini"写道:



我只是初学者,我在我的
asp.net-application ....中使用c#-codebehind .... br />我该怎么做才能使我的应用程序工作没有代码隐藏(在bin文件夹中没有
dll.-s)?

我在谷歌搜索一些关于Src而不是Codebehind(在@page
指令中),但我不知道从哪里开始...

请提供帮助,

提前致谢,

Krunom。





您需要编写可能在代码隐藏文件中编写的所有代码,

直接到HTML代码区。

类似于你在页面上写的java脚本。


regds,


" Krunom Ancini"写道:



我只是初学者,我在我的
asp.net-application ....中使用c#-codebehind .... br />我该怎么做才能使我的应用程序工作没有代码隐藏(在bin文件夹中没有
dll.-s)?

我在谷歌搜索一些关于Src而不是Codebehind(在@page
指令中),但我不知道从哪里开始...

请提供帮助,

提前致谢,

Krunom。


将它放在ASPX文件的顶部:

<%@ Page language =" C#" SRC =" YourCodebehind.aspx.cs" AutoEventWireup =" false"

Inherits =" YourNamespace.YourCodebehind" %>


正常编写代码隐藏类。


服务器代码也可以直接嵌入ASPX页面的顶部,

虽然我不推荐它。

< script language =" C#" runat =" server">

//代码

< / script>


-

问候,

DennisJDMyrén

Oslo Kodebureau

" Krunom Ancini" < KR **** @ hotmail.com>在消息中写道

新闻:38 ************* @ individual.net ...


asp.net应用程序中使用c#-codebehind ....
我应该怎么做才能使我的应用程序工作没有代码隐藏
(在bin文件夹中没有dll.-s)?

我在搜索Src而不是Codebehind(在@page
指令中),但我不知道从哪里开始...

请提供帮助,

提前致谢,

Krunom。



Hi,

im just the beginner and im using c#-codebehind in my
asp.net-application....
What should i do to make my application work "without" code-behind (without
dll.-s in bin-folder)?

I was googling something about Src instead of Codebehind (in @page
directive) but i dont know where to start...

Please help,

thanks in advance,

Krunom.

解决方案

Hi,

You need to write all the code that you might write in the code behind file,
directly to the HTML code area.
something similar to java scripts that you write on the page.

regds,

"Krunom Ancini" wrote:

Hi,

im just the beginner and im using c#-codebehind in my
asp.net-application....
What should i do to make my application work "without" code-behind (without
dll.-s in bin-folder)?

I was googling something about Src instead of Codebehind (in @page
directive) but i dont know where to start...

Please help,

thanks in advance,

Krunom.



Hi,

You need to write all the code that you might write in the code behind file,
directly to the HTML code area.
something similar to java scripts that you write on the page.

regds,

"Krunom Ancini" wrote:

Hi,

im just the beginner and im using c#-codebehind in my
asp.net-application....
What should i do to make my application work "without" code-behind (without
dll.-s in bin-folder)?

I was googling something about Src instead of Codebehind (in @page
directive) but i dont know where to start...

Please help,

thanks in advance,

Krunom.



Put this at the top of the ASPX file:
<%@ Page language="C#" src="YourCodebehind.aspx.cs" AutoEventWireup="false"
Inherits="YourNamespace.YourCodebehind" %>

Write the codebehind class as normally.

Server code may also be embedded directly at the top of the ASPX page,
although i would not recommend it.
<script language="C#" runat="server">
// Code
</script>

--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"Krunom Ancini" <kr****@hotmail.com> wrote in message
news:38*************@individual.net...

Hi,

im just the beginner and im using c#-codebehind in my
asp.net-application....
What should i do to make my application work "without" code-behind
(without dll.-s in bin-folder)?

I was googling something about Src instead of Codebehind (in @page
directive) but i dont know where to start...

Please help,

thanks in advance,

Krunom.



这篇关于Codebehind - &gt; SRC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆