在主页的内容页面中发生事件时刷新页面 [英] page refresh on event occuring in content page of masterpage

查看:62
本文介绍了在主页的内容页面中发生事件时刷新页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个页面,在该页面中,通过文本框的值生成了动态字段的数量,我在text_change属性上编写了此代码.
我将此页面与我的母版页合并为母版页的内容.但是动态字段没有生成.没有母版页,它的工作正常.但是之后不是.
我认为我需要刷新内容页面才能获得代码效果.

抱歉,克里斯蒂安..但我不知道哪一部分代码是错误的.
我修改了我的问题,所以请帮忙.
我只是在我的主页上写了以下内容

& lt;%@页面语言="C#" AutoEventWireup ="true" CodeBehind ="indent.aspx.cs" Inherits ="kwarkfinal._Default" MasterPageFile =〜/Site2.Master"%& gt;

并且在母版页中我有此代码
< pre lang ="xml">& lt; asp:ContentPlaceHolder ID =& quot; cph1& quot; runat =& quot;服务器& gt;

& lt; p& gt;
& nbsp;</p& gt;

& lt;/asp:ContentPlaceHolder& gt;</pre>
上面的主页在没有合并的情况下工作正常.之后,它就无法工作.
为了生成动态字段,我有
受保护的void TextBox53_TextChanged(对象发送者,EventArgs e)
{
}
并在页面上加载
< pre lang ="cs"> if(TextBox53.Text ==& quot;& quot))
{
}
其他
{
TextBox54.text ="sad";
}
</pre>
只有这样我才能告诉你我的项目.
请帮忙.


请尽快帮助我.

I have created a page in which, by the value of the text box the number of dynamic fields get generated, i wrote this code on text_change property.
i combined this page with my master page as a content of the master page. but the dynamic fields are not generating than. without master page its working fine. but after that it is not.
i think i need to refresh the content page to get effect of code.

sorry christian.. but i dont know which part of code is wrong.
i modified my question so please help.
i simply wrote following in my main page

&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="indent.aspx.cs" Inherits="kwarkfinal._Default" MasterPageFile="~/Site2.Master"%&gt;

and in master page i have this code
<pre lang="xml">&lt;asp:ContentPlaceHolder ID=&quot;cph1&quot; runat=&quot;server&quot;&gt;

&lt;p&gt;
&amp;nbsp;&lt;/p&gt;

&lt;/asp:ContentPlaceHolder&gt;</pre>
the above main page is working fine with out merging.. after that its not working.
and for generating dynamic fields i have
protected void TextBox53_TextChanged(object sender, EventArgs e)
{
}
and on page load
<pre lang="cs">if (TextBox53.Text == &quot;&quot;)
{
}
else
{
TextBox54.text = "sad";
}
</pre>
this only that i can tell u about my project.
please help.


please help me as soon as possible.

推荐答案

Nishant_Mishra写道:
Nishant_Mishra wrote:

请帮助我尽快.



当我们想要帮助随机的陌生人时,我们将为您提供帮助.如果您很着急,为什么不发布导致问题的代码.我只能告诉您的是,您的代码已损坏,如果您正确连接母版页,则对您的代码工作没有任何影响.



We will help you when we feel like helping a random stranger. If you''re in such a hurry, why have you not posted the code that causes the problem. All I can tell you, is that your code is broken, and if you hook up your master page properly, it should make no difference to your code working.


这篇关于在主页的内容页面中发生事件时刷新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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