显示图片:


    <div class="body_left_tab2 f_l">
          
<script type=text/javascript>
        
<!--
        
        
var focus_width=240;
        
var focus_height=246;
        
var text_height=20;
        
var swf_height = focus_height+text_height;
        
        
var pics=<uc1:showpicInf id='showpicInf1' id1='12' id2='13' id3='14' id4='15' runat=server></uc1:showpicInf>
        
        
var links=<uc1:showurl id='showurl1' id1='12' id2='13' id3='14' id4='15' runat=server></uc1:showurl>
        
        
var texts=<uc1:showtitleinf id='showtitleinf1' id1='12' id2='13' id3='14' id4='15' runat=server></uc1:showtitleinf>
        
        document.write('
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
        document.write('
<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/images/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#F2F2F2">');
        document.write('
<param name="menu" value="false"><param name=wmode value="opaque">');
        document.write('
<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
        document.write('
<embed src="/images/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ffffff" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('
</object>');
        
        
//-->
        
</script>
    
</div>



在图片 连接 文本提示的动态显示直接加控件
ShowPicInf
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="showpicInf.ascx.cs" Inherits="Luyou.control.showpicInf" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%=showtext%>
<FONT face="宋体"></FONT>
        public string showtext; 
        
public string id1="0";
        
public string id2="0";
        
public string id3="0";
        
public string id4="0";
        
public string id5="0";
        
protected void Page_Load(object sender, System.EventArgs e)
        
{        
            BLL_Ad.AdInf adinf 
= new BLL_Ad.AdInf ();
            Model_Ad.AdInf madinf 
= new Model_Ad.AdInf();
            
try
            
{
                
if(!id1.Equals("0"))
                
{
                    
if(adinf.Exists(id1))
                    
{
                        madinf 
= adinf.GetModel(id1);
                        showtext 
= "/"+madinf.url;
                    }

                }

            }

            
catch(System.Exception)
            
{}
            
try
            
{
                
if(!id2.Equals("0"))
                
{
                    
if(adinf.Exists(id2))
                    
{
                        madinf 
= adinf.GetModel(id2);
                        showtext 
= showtext+"|"+"/"+madinf.url;
                    }

                }

            }

            
catch(System.Exception)
            
{}
            
try
            
{
                
if(!id3.Equals("0"))
                
{
                    
if(adinf.Exists(id3))
                    
{
                        madinf 
= adinf.GetModel(id3);
                        showtext 
= showtext+"|"+"/"+madinf.url;
                    }

                }

            }

            
catch(System.Exception)
            
{}
            
try
            
{
                
if(!id4.Equals("0"))
                
{
                    
if(adinf.Exists(id4))
                    
{
                        madinf 
= adinf.GetModel(id4);
                        showtext 
= showtext+"|"+"/"+madinf.url;
                    }

                }

            }

            
catch(System.Exception)
            
{}
            
try
            
{
                
if(!id5.Equals("0"))
                
{
                    
if(adinf.Exists(id5))
                    
{
                        madinf 
= adinf.GetModel(id5);
                        showtext 
= showtext+"|"+"/"+madinf.url;
                    }

                }

            }

            
catch(System.Exception)
            
{}
            showtext 
= "'" + showtext + "'";
            
        }


ShowUrl
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="showurl.ascx.cs" Inherits="Luyou.control.showurl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%=showtext%>
public string showtext;
        
public string id1="0";
        
public string id2="0";
        
public string id3="0";
        
public string id4="0";
        
public string id5="0";
        
protected void Page_Load(object sender, System.EventArgs e)
        
{                            
            BLL_Ad.AdInf adinf 
= new BLL_Ad.AdInf();
            Model_Ad.AdInf madinf 
= new Model_Ad.AdInf();
            
if(!id1.Equals("0"))
            
{
                
if(adinf.Exists(id1))
                
{
                    madinf 
= adinf.GetModel(id1);
                    showtext 
= madinf.neturl;
                }

            }

            
if(!id2.Equals("0"))
            
{
                
if(adinf.Exists(id2))
                
{
                    madinf 
= adinf.GetModel(id2);
                    showtext 
= showtext+"|"+madinf.neturl;
                }

            }

            
if(!id3.Equals("0"))
            
{
                
if(adinf.Exists(id3))
                
{
                    madinf 
= adinf.GetModel(id3);
                    showtext 
= showtext+"|"+madinf.neturl;
                }

            }

            
if(!id4.Equals("0"))
            
{
                
if(adinf.Exists(id4))
                
{
                    madinf 
= adinf.GetModel(id4);
                    showtext 
= showtext+"|"+madinf.neturl;
                }

            }

            
if(!id5.Equals("0"))
            
{
                
if(adinf.Exists(id5))
                
{
                    madinf 
= adinf.GetModel(id5);
                    showtext 
= showtext+"|"+madinf.neturl;
                }

            }

            showtext 
= "'" + showtext + "'";

            
        }

ShowTitleInf
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="showtitleinf.ascx.cs" Inherits="Luyou.control.showtitleinf" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%=showtext%>
public string showtext;
        
public string id1="0";
        
public string id2="0";
        
public string id3="0";
        
public string id4="0";
        
public string id5="0";
        
protected void Page_Load(object sender, System.EventArgs e)
        
{
            
                
                BLL_Ad.AdInf adinf 
= new BLL_Ad.AdInf();
                Model_Ad.AdInf madinf 
= new Model_Ad.AdInf();
            
try
            
{
                
if(!id1.Equals("0"))
                
{
                    
if(adinf.Exists(id1))
                    
{
                        madinf 
= adinf.GetModel(id1);
                        showtext 
= madinf.adname;
                    }

                }

            }

            
catch(System.Exception)
            
{}
            
try
            
{
                
if(!id2.Equals("0"))
                
{
                    
if(adinf.Exists(id2))
                    
{
                        madinf 
= adinf.GetModel(id2);
                        showtext 
= showtext+"|"+madinf.adname;
                    }

                }

            }

            
catch(System.Exception)
            
{}
            
try
            
{
                
if(!id3.Equals("0"))
                
{
                    
if(adinf.Exists(id3))
                    
{
                        madinf 
= adinf.GetModel(id3);
                        showtext 
= showtext+"|"+madinf.adname;
                    }

                }

            }

            
catch(System.Exception)
            
{}
            
try
            
{
                
if(!id4.Equals("0"))
                
{
                    
if(adinf.Exists(id4))
                    
{
                        madinf 
= adinf.GetModel(id4);
                        showtext 
= showtext+"|"+madinf.adname;
                    }

                }

            }

            
catch(System.Exception)
            
{}
            
try
            
{
                
if(!id5.Equals("0"))
                
{
                    
if(adinf.Exists(id5))
                    
{
                        madinf 
= adinf.GetModel(id5);
                        showtext 
= showtext+"|"+madinf.adname;
                    }

                }

            }

            
catch(System.Exception)
            
{}
            showtext 
= "'" + showtext + "'";

posted on 2007-11-27 09:27  小角色  阅读(373)  评论(1)    收藏  举报