首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

请问一个常识性的有关问题,请

2012-01-20 
请教一个常识性的问题,请高手指点。%@PageLanguage C# AutoEventWireup true CodeFile Product_Up

请教一个常识性的问题,请高手指点。
<%@   Page   Language= "C# "   AutoEventWireup= "true "     CodeFile= "Product_Update.aspx.cs "   Inherits= "WebUI.Manage.Prduct_Update "   %>

<!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN "   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

<html   xmlns= "http://www.w3.org/1999/xhtml "   >
<head   runat= "server ">
        <title> Unit   Page </title>
</head>

<script   language=javascript   type= "text/javascript ">

function   ShowTempImage(imageCtlID,fileCtlID)
{
var   filepath=document.getElementById(fileCtlID).value;
var   fileEx=filePath.split( ". ");
var   fileExName=(fileEx[fileEx.Length-1]).toLowerCase();
if(fileExName== "jpg "||fileExName== "gif ")
{
document.getElementById(imageCtlID).style.visibility= "visible ";
document.getElementById(imageCtlID).src=filePath;
}
else
{
document.getElementById(imageCtlID).style.visibility= "hidden ";
}
}
</script>
<body>
        <form   id= "form1 "   runat= "server ">
        <div>
            <table   border= "0 "   style= "width:100% ">
                <tr>
                        <td   style= "width:100% ">
                        </td>
                </tr>
                <tr>
                <td   style= "width:100%;height:152px; ">
                <table   border= "1 "   style= "width:100% ">
                <tr>
                    <td   style= "width:100% "> 产品名称 </td>
                      <td   style= "width:546px ">
                      <asp:TextBox   ID= "txt_pname "   runat=server> </asp:TextBox>
                      </td>
                </tr>
                <tr>
                      <td   style= "width:100% "> 类别 </td>
                      <td   style= "width:546px ">  
                      <asp:DropDownList   ID= "ddl_ptype "   runat=server   Width= "158px "> </asp:DropDownList>
                      </td>


                </tr>
                <tr>
                        <td   style= "width:100% ">
                        产品图片 </td>
                        <td   style= "width:546px ">
                        &nbsp;&nbsp;
                        <table   border= "0 "   cellpadding= "0 "   cellspacing= "0 "   style= "width:100% ">
                        <tr>
                          <td   style= "width:100% ">
                            <asp:Image   ID= "Image1 "   runat=server   Height= "100% "   Width= "100% "   ImageUrl= "../UpLoadFiles/nopic.jpg "   />
                          </td>
                        </tr>
                        <tr>
                            <td   style= "width:100% ">
                            <asp:FileUpload   ID= "fu_pimg "   runat=server   />
                            </td>
                        </tr>
                       
                        </table>
                        </td>
                </tr>
                <tr> <td> </td> <td> </td> </tr>
                <tr>
                        <td   style= "width:100% "> 详细信息 </td>
                        <td   style= "width:546px ">
                        <asp:TextBox   ID= "txt_pinfo "   runat=server   Height= "338px "   TextMode=MultiLine   Width= "558px "> </asp:TextBox>
                        </td>
                </tr>
                <tr>


                                <td   style= "width:100% "> </td>
                                <td   style= "width:546px ">
                                <asp:Button   ID= "Button1 "   runat=server   Text= "保存产品信息 "   OnClick= "Button1_Click "   OnCommand= "Button1_Command "   />
                                </td>
                </tr>
                <tr>
                                <td   style= "width:100% "> </td>
                                <td   style= "width:546px "> </td>
                </tr>
                </table>
                </td>
                </tr>
                <tr>
                    <td   style= "width:100% "> </td>
                </tr>
                <tr>
                  <td   style= "width:100% "> </td>
                </tr>
            </table>
        </div>
        </form>
</body>
</html>
然后我在aspx.cs里面想给html里面的一个空间赋值得时候txt_pname.text的时候竟然没有联想功能,也就是我打个txt_pname的时候后面不会自动出来.text想请高手指点

[解决办法]
常见的bug
try "this. "
[解决办法]
你先自己直接加.Text,然后编译看会不会报错。
[解决办法]
这个说不准的,你自己编译试一下会不会报错

热点排行