想用FreeTextBox做新闻发布,遇到一些问题,在此求助。环境:VS2008(C#),FreeTextBox是V3.2.4版本。
遇到的问题有:
1、运行时,介面FreeTextBox工具栏显示的是中文,见图一,但当鼠标点入输入框内准备输入时工具栏显示的是英文,见图二。图一:图二:
2、点击FreeTextBox工具栏的插入图片时,要人工输入路径,这样对用户很不方便,能否显示“浏览”让用户能选择路径和文件,再点上传?(见图三)图三:
附上文件源代码:
(1)Default.aspx文件源代码<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><%@ Register assembly="FreeTextBox" namespace="FreeTextBoxControls" tagprefix="FTB" %><!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>Test FreeTextBox</title>  <style type="text/css">
  .style1
  {
  width: 980px;
  }
  </style></head>
<body>
  <form id="form1" runat="server">
  <table align="center" cellpadding="0" cellspacing="0" class="style1">
  <tr>
  <td>
  &nbsp;</td>
  </tr>
  <tr>
  <td align="center">
  <FTB:FreeTextBox ID="FreeTextBox1" runat="server"
Language="zh-CN"   
  >
  </FTB:FreeTextBox>
    
  </td>
  </tr>
  <tr>
  <td align="center" height="60">
  <asp:Button ID="Button1" runat="server" Height="23px" Text="保 存"  
  Width="93px" />
  </td>
  </tr>
  </table>
</form>
  </body>
</html>
(2)ftb.imagegallery.aspx文件源码
当关闭:return这一句时
其中:System.IO.FileInfo[] customImages = new System.IO.FileInfo[2] {defaultImages[0], defaultImages[1]};
这一句报错:“超出数组界限”<%@ Page Language="C#" ValidateRequest="false" Trace="false" %>
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<%@ Import Namespace= "System.Xml " %>  
<%@ Import Namespace= "System.IO " %>  
<script runat="server">
protected void Page_Load(Object Src, EventArgs E) {// *** remove this return statement to use the following code ***
//return;string currentFolder = ImageGallery1.CurrentImagesFolder;// modify the directories allowed
if (currentFolder == "~/images") {// these are the default directories FTB:ImageGallery will find
string[] defaultDirectories = System.IO.Directory.GetDirectories(Server.MapPath(currentFolder),"*");// user defined custom directories
string[] customDirectories = new string[] {"folder1","folder2"};// the gallery will use these images in this instance
ImageGallery1.CurrentDirectories = customDirectories;
}
// modify the images allowed
if (currentFolder == "~/images") {System.IO.DirectoryInfo directoryInfo = new System.IO.DirectoryInfo(Server.MapPath(currentFolder));// these are the default images FTB:ImageGallery will find
System.IO.FileInfo[] defaultImages = directoryInfo.GetFiles("*");// user defined custom images (here, we're just allowing the first two)
System.IO.FileInfo[] customImages = new System.IO.FileInfo[2] {defaultImages[0], defaultImages[1]};// the gallery will use these images in this instance
ImageGallery1.CurrentImages = customImages;
} }
</script>
<html>
<head>
<title>Image Gallery</title>
</head>
<body>  <form id="Form1" runat="server" enctype="multipart/form-data">   
    
<FTB:ImageGallery id="ImageGallery1"  
JavaScriptLocation="ExternalFile"  
UtilityImagesLocation="ExternalFile"  
SupportFolder="~/aspnet_client/FreeTextBox/"
AllowImageDelete=false AllowImageUpload=true AllowDirectoryCreate=false AllowDirectoryDelete=false runat="Server" /></form></body>
</html>