• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# AjaxControlToolkit类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中AjaxControlToolkit的典型用法代码示例。如果您正苦于以下问题:C# AjaxControlToolkit类的具体用法?C# AjaxControlToolkit怎么用?C# AjaxControlToolkit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AjaxControlToolkit类属于命名空间,在下文中一共展示了AjaxControlToolkit类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: articleRating_Changed

        protected void articleRating_Changed(object sender, AjaxControlToolkit.RatingEventArgs e)
        {
            if (User.Identity.Name == "")
            {
                warning.Text = "Članak mogu ocijeniti samo prijavljeni korisnici.";
                warning_block.Visible = true;
            }
            else
            {
                ClanciOcjene grade = new ClanciOcjene();
                grade.ClanakID = articleId;
                grade.KorisnikID = Convert.ToInt32(User.Identity.Name);
                grade.Ocjena = articleRating.CurrentRating;
                grade.DatumKreiranja = DateTime.Now;
                grade.DatumIzmjene = DateTime.Now;
                DAClanci.GradeArticle(grade);
                articleRating.ReadOnly = true;

                ratingLabel.Text = "Vaša ocjena: " + grade.Ocjena.ToString();
                dateRatedLabel.Text = string.Format("{0:dd.MM.yyyy}", grade.DatumKreiranja);
                rating_block.Visible = true;

                BindGrade();
            }
        }
开发者ID:fitba,项目名称:km-2013-projects-team-bjelasnica,代码行数:25,代码来源:Details.aspx.cs


示例2: AjaxFileUploadIdentitasLahan_UploadComplete

    public void AjaxFileUploadIdentitasLahan_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
    {
        if (Session["userid"] is object)
         {
             userid = Session["userid"].ToString();
         }

         //string user = "";
         string wilayah = "";

         LANDCOMP.generateNUm gn = new LANDCOMP.generateNUm();
         gn.Datas();

         string _stNomor;

         string _stDates = DateTime.Today.ToString("yyyyMMdd");

         string uploadFolder = Request.PhysicalApplicationPath + "uploadDocument\\";

         LANDCOMP.paramz ext = new LANDCOMP.paramz();

         ext.setExtension(Path.GetExtension(e.FileName));

         if (ext.getExtsion() != ".exe")
         {
             _stFAsli = System.IO.Path.GetFileName(e.FileName);

             _stNomor = gn.GenerateNumber("", 101, 10, _stDates, userid);

             AjaxFileUploadIdentitasLahan.SaveAs(uploadFolder + _stNomor + ext.getExtsion());
             e.PostedUrl = string.Format(e.FileName + "|" + _stNomor + "|" + userid + "|" + wilayah);

         }
    }
开发者ID:VikySihabudin,项目名称:Landai,代码行数:34,代码来源:MasterIdentitasForm.aspx.cs


示例3: AjaxFileUploadVerifikasi_UploadComplete

    public void AjaxFileUploadVerifikasi_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
    {
        if (Session["userid"] is object) userid = Session["userid"].ToString();

        //if (Request.Params["param7"] is object)
        param7 = ddprs.SelectedValue.ToString();

        //string user = "";
        string wilayah = "";

        ALMIS.generateNUm gn = new ALMIS.generateNUm();
        gn.Datas();

        string _stNomor;

        string _stDates = DateTime.Today.ToString("yyyyMMdd");

        string uploadFolder = Request.PhysicalApplicationPath + "uploadDocument\\";

        ALMIS.paramz ext = new ALMIS.paramz();

        ext.setExtension(Path.GetExtension(e.FileName));

        if (ext.getExtsion() != ".exe")
        {
            _stFAsli = System.IO.Path.GetFileName(e.FileName);

            _stNomor = gn.GenerateNumber(param7, 101, 12, _stDates, userid);

            AjaxFileUploadVerifikasi.SaveAs(uploadFolder + _stNomor + ext.getExtsion());
            e.PostedUrl = string.Format(e.FileName + "|" + _stNomor + "|" + userid + "|" + wilayah);

        }
    }
开发者ID:VikySihabudin,项目名称:almis,代码行数:34,代码来源:VerifikasiForm.aspx.cs


示例4: AsyncFileUpload1_UploadedComplete

    //protected void dsSelectedCompany_Inserted(object sender, SqlDataSourceStatusEventArgs e)
    //{
    //    //switch back to the GV
    //    mvCompanies.ActiveViewIndex = 0;
    //     //update the GV
    //    gvCompanies.DataBind();
    //}
    //protected void dsSelectedCompany_Updated(object sender, SqlDataSourceStatusEventArgs e)
    //{
    //    //switch back to the GV
    //    mvCompanies.ActiveViewIndex = 0;
    //    gvCompanies.DataBind();//update the GV
    //}
    protected void AsyncFileUpload1_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
    {
        #region LOGO UPLOAD

        //find the control in the detailsview
        AsyncFileUpload afuLogo = (AsyncFileUpload)fvSelectedCompany.FindControl
            ("AsyncFileUpload1");

        //generate a new unique image name
          //get the original filename for its file extension
        string imageName = afuLogo.FileName;//tells u the name of the filename they are uploading

        //get the extension
        string ext = imageName.Substring(imageName.LastIndexOf("."));

        //create a random unique filename (use GUID)
          //GUID creates a unique value, then tack on the extension
        string newImageName = Guid.NewGuid().ToString() + ext;

        //save the image to the students images folder using the new name
        afuLogo.SaveAs(Server.MapPath("~/images/" +
            newImageName));

        #endregion

        //When the record above is inserted or uploaded, we will need the
          //new filename to be used in the CompanyLogo field.
        Session["newImage"] = newImageName;
    }
开发者ID:haglerca,项目名称:CareerFinder,代码行数:42,代码来源:CopyofCompanies.aspx.cs


示例5: AjaxFileUpload1_UploadComplete

        protected void AjaxFileUpload1_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
        {
            string sPathFile = ConfigurationManager.AppSettings["PathDocs"].ToString();
            string NomeFile = _ID + "_" + ((int)_Tipo).ToString() +  "_" + DateTime.Parse(DataDocumento.Value).ToString("yyMMdd") + "_" +Path.GetFileNameWithoutExtension( e.FileName.Replace(" " ,"_")) +  Path.GetExtension(e.FileName);
            string filePath = sPathFile + "Documenti\\"+ NomeFile;
            string resizeImage = "";

            string ext = Path.GetExtension(NomeFile).ToLower();
            if (ext == ".jpg" || ext == ".png" || ext == ".jpeg" || ext == ".tif" || ext == ".bmp")
            {
                resizeImage = NomeFile;
            }
            else if (ext == ".pdf")
            {
                resizeImage = "icon_pdf.png";
            }
            else if (ext == ".doc" || ext == ".docx")
            {
                resizeImage = "icon_doc.png";
            }
            if (inserisciDoc(_Tipo, _ID, NomeFile, DateTime.Now, DateTime.Parse(DataDocumento.Value), DateTime.Parse(DataScadenzaDoc.Value), resizeImage))
            { 
                AjaxFileUpload1.SaveAs(filePath); 
                
            }
            //Se è un immagine creo la mignatura e poi aggiorno il record
            if (ResizeImage(filePath))
            {

            }
            SqlDataSource1.DataBind();
            GridView1.DataBind(); 

        }
开发者ID:PaoloMisson,项目名称:GATEvolution,代码行数:34,代码来源:InserimentoDocumento.ascx.cs


示例6: File_Upload

    protected void File_Upload(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
    {
        string devicekindid = Session["DeviceKindid"].ToString();
        //string devicekindid = "13";
        AjaxFileUpload1.SaveAs(Server.MapPath(iconPath + devicekindid + ".gif"));

    }
开发者ID:hiway86,项目名称:PRS_KAO,代码行数:7,代码来源:App_Web_nswlffpv.1.cs


示例7: AsyncFileUpload1_UploadedComplete

 protected void AsyncFileUpload1_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
 {
     if (AsyncFileUpload1.HasFile && e.State == AjaxControlToolkit.AsyncFileUploadState.Success)
     {
         AsyncFileUpload1.SaveAs(Utils.PrepareUserDir(fiName) + e.FileName);
     }
 }
开发者ID:plamikcho,项目名称:xbrlpoc,代码行数:7,代码来源:Default.aspx.cs


示例8: fluDocument_UploadedComplete

    protected void fluDocument_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
    {
        if (this.fluDocument.HasFile)
        {
            if (this.fluDocument.PostedFile.ContentType.Equals("image/pjpeg") || this.fluDocument.PostedFile.ContentType.Equals("image/x-png"))
            {
                byte[] fileByte = this.fluDocument.FileBytes;
                Binary binaryObj = new Binary(fileByte);
                Ajancy.Kimia_Ajancy db = new Ajancy.Kimia_Ajancy(Public.ConnectionString);
                Ajancy.Doument doc = db.Douments.FirstOrDefault<Ajancy.Doument>(d => d.PersonID == Public.ActiveUserRole.User.PersonID && d.DocumentType == 1);

                if (doc == null)
                {
                    doc = new Ajancy.Doument
                                {
                                    DocumentType = Public.ToByte(this.drpType.SelectedValue),
                                    PersonID = Public.ActiveUserRole.User.PersonID,
                                    Picture = binaryObj,
                                    SubmitDate = DateTime.Now
                                };
                    db.Douments.InsertOnSubmit(doc);
                }
                else
                {
                    doc.Picture = binaryObj;
                }
                db.SubmitChanges();
                db.Dispose();
            }
        }
    }
开发者ID:BehnamAbdy,项目名称:Ajancy,代码行数:31,代码来源:UploadDocument.aspx.cs


示例9: drawLineChart

    /// <summary>
    /// </summary>
    /// <param name="dt"></param>
    /// <param name="LineChart"></param>
    public void drawLineChart(AjaxControlToolkit.LineChart Chart, DataTable dt, int yScaleFactor = 1)
    {
        if (Chart == null) return;

        string[] x = new string[dt.Columns.Count - 1];

        for (int i = 1; i < dt.Columns.Count; ++i)
        {
            x[i - 1] = dt.Columns[i].ColumnName;
            Chart.CategoriesAxis = string.Join(",", x);
            //Response.Write(ClsConvert.ArrayToHTML(x));
        }
        for (int i = 0; i < dt.Rows.Count; ++i)
        {
            decimal[] y = new decimal[dt.Columns.Count - 1];
            for (int j = 1; j < dt.Columns.Count; ++j)
            {
                y[j - 1] = Convert.ToDecimal(ClsUtil.ObjToDouble(dt.Rows[i][j])) * yScaleFactor;
            }
            //Response.Write(ClsConvert.ArrayToHTML(y));
            Chart.Series.Add(new AjaxControlToolkit.LineChartSeries { Name = dt.Rows[i][0].ToString(), Data = y });
        }
        Chart.ChartTitle = dt.TableName;

        Chart.Visible = true;
    }
开发者ID:chenx,项目名称:Ci40_1,代码行数:30,代码来源:ClsAjaxChart.cs


示例10: AjaxFileUpload_UploadComplete

 protected void AjaxFileUpload_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
 {
     string fileName = "dateweek"+DateTime.Now.ToString("yyyMMddHHss") + new Random().Next(999) + e.ContentType;// +e.FileName;
     string fullPath = Server.MapPath(ConfigurationManager.AppSettings["PH_FolderUpload"] + fileName);
     AjaxFileUpload.SaveAs(fullPath);
     Session["fileName"] = fullPath;
 }
开发者ID:parnupongk,项目名称:primary,代码行数:7,代码来源:master_dayweek.aspx.cs


示例11: Accordion1_ItemDataBound

        protected void Accordion1_ItemDataBound(object sender, AjaxControlToolkit.AccordionItemEventArgs e)
        {
            if (e.ItemType == AjaxControlToolkit.AccordionItemType.Content)
            {
                HiddenField hdfid = (HiddenField)e.AccordionItem.FindControl("hdfCodigo");
                HiddenField hdfsillas = (HiddenField)e.AccordionItem.FindControl("hdfsillas");
                Panel pnlInside = (Panel)e.AccordionItem.FindControl("PnlInside");

                //'se crea un ciclo for que añade un texto por cada fila en el dataset
                for (int i = 0; i < Convert.ToInt32(hdfsillas.Value); i++)
                {

                    LinkButton lkButon = new LinkButton();
                    Literal ltl = new Literal();
                    lkButon.ID = "lkButon" + i.ToString();
                    lkButon.CssClass = "icon-retweet";
                    lkButon.Text = "Silla" + (i + 1).ToString();
                    lkButon.CommandArgument = hdfid.Value + ":" + (i + 1).ToString();
                    lkButon.Click += new EventHandler(lkButon_Click);
                    pnlInside.Controls.Add(lkButon);
                    ltl.Text = "<br />";
                    pnlInside.Controls.Add(ltl);
                }

            }
        }
开发者ID:blackneus,项目名称:restaurant,代码行数:26,代码来源:Mesero.aspx.cs


示例12: Rt1_Changed

    protected void Rt1_Changed(object sender, AjaxControlToolkit.RatingEventArgs e)
    {
        Snlg_DBParameter[] prms = new Snlg_DBParameter[4];
        prms[0] = new Snlg_DBParameter("@MakId", SqlDbType.Int, Request.QueryString["makid"]);
        prms[1] = new Snlg_DBParameter("@Puan", SqlDbType.TinyInt, e.Value);

        prms[2] = new Snlg_DBParameter("@YazanId", SqlDbType.Int);
        prms[3] = new Snlg_DBParameter("@IP", SqlDbType.VarChar, 15);
        if (string.IsNullOrEmpty(Snlg_MemberInfo.s_UserId.ToString()))
        {//üye değilse
            prms[2].Deger = DBNull.Value;
            prms[3].Deger = Request.ServerVariables["REMOTE_ADDR"];
        }
        else
        {//üye ise
            prms[2].Deger = Snlg_MemberInfo.s_UserId;
            prms[3].Deger = DBNull.Value;
        }

        try
        {
            vt.SorguCalistir("snlg_V1.zsp_makale_PuanEkle", CommandType.StoredProcedure, prms);
            Snlg_Hata.ziyaretci.HataGosterBasarili(GetGlobalResourceObject("default", "makale_detay_ascx_hata04").ToString(), false);
        }
        catch (Exception exc) { Snlg_Hata.ziyaretci.ExceptionLogla(exc); }
    }
开发者ID:yasinbolat,项目名称:Sanalog-1.5.2-Web,代码行数:26,代码来源:article-detail.ascx.cs


示例13: FileUploadComplete

 //public string parentPath = System.Configuration.ConfigurationSettings.AppSettings["parentPath"];
 protected void FileUploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
 {
     string parentPath = System.Configuration.ConfigurationManager.AppSettings["parentPath"];
     string idaDir = parentPath + Session["dirID"] + @"\";
     string filePath = idaDir + e.FileName;
     valred.Attributes["Value"] = "0099";
     DirectoryInfo di = new DirectoryInfo(idaDir);
     try
     {
         // Determine whether the directory exists.
         if (di.Exists)
         {
             AjaxFileUpload1.SaveAs(filePath);
             Console.WriteLine("That path exists already.");
             return;
         }
         else {
             di.Create();
             AjaxFileUpload1.SaveAs(filePath);
         }
     }
     catch (Exception er)
     {
         Console.WriteLine("The process failed: {0}", er.ToString());
     }
     finally { }
 }
开发者ID:nathanielasare,项目名称:generationflux,代码行数:28,代码来源:Fileupload.aspx.cs


示例14: ElaborazioneGeneraForm

        public void ElaborazioneGeneraForm(AjaxControlToolkit.TabContainer TabContainerReferti, int iFormTipo)
        {
            string sSql = @"SELECT     FormCampi.* FROM         FormCampi
                    WHERE     (IDFormTipo = @IDFormTipo)
                    ORDER BY Posizione";
            SqlCommand cmd = new SqlCommand(sSql, _Conn);


            SqlParameter par = new SqlParameter("@IDFormTipo", iFormTipo);
            cmd.Parameters.Add(par);

            SqlDataAdapter adap = new SqlDataAdapter(cmd);

            DataTable dt = new DataTable();
            adap.Fill(dt);

            for (int x = 0; x < 6; x++)
            {
                AjaxControlToolkit.TabPanel tabPan = new AjaxControlToolkit.TabPanel();
                try
                {
                    foreach (DataRow dr in dt.Select("PosizioneTab = " + x))
                    {
                        FormCampi campo = new FormCampi(dr);
                        GeneraComponenti(campo, ref tabPan);
                    }
                }
                catch
                { }
                if (tabPan.Controls.Count > 0)
                    TabContainerReferti.Tabs.Add(tabPan);
            }
        }
开发者ID:PaoloMisson,项目名称:GATEvolution,代码行数:33,代码来源:GeneraForm.cs


示例15: cbe_ResolveTargetControlID

 protected void cbe_ResolveTargetControlID(object sender, AjaxControlToolkit.ResolveControlEventArgs e)
 {
     if (e.ControlID == "LoginViewButton")
     {
         e.Control = LoginView1.FindControl(e.ControlID);
         AddMessage("cbe_ResolveTargetControlID", e.ControlID);
     }
 }
开发者ID:sumutcan,项目名称:WTWP-Ticket-Booking,代码行数:8,代码来源:ExtenderBase.aspx.cs


示例16: NoBot1_GenerateChallengeAndResponse

    protected void NoBot1_GenerateChallengeAndResponse(object sender,
        AjaxControlToolkit.NoBotEventArgs e)
    {
        NoBotState state;
        NoBot1.IsValid(out state);

        Label1.Text = state.ToString();
    }
开发者ID:kacecode,项目名称:SchoolWork,代码行数:8,代码来源:NoBot.aspx.cs


示例17: ajaxFileUpload_OnUploadComplete

    protected void ajaxFileUpload_OnUploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
    {
        string filePath = "~/imagenes/programasGenerales/" + e.FileName;

        var ajaxFileUpload = (AjaxFileUpload)sender;
        ajaxFileUpload.SaveAs(MapPath(filePath));

        e.PostedUrl = Page.ResolveUrl(filePath);
    }
开发者ID:jquirogadesarrollador,项目名称:Varu_Original,代码行数:9,代码来源:programaGeneral.aspx.cs


示例18: FileUploadComplete

    protected void FileUploadComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
    {

        if (AsyncFileUpload1.HasFile)
        {
            var fileName = AsyncFileUpload1.FileName;
            var fileExtension = fileName.Substring(fileName.LastIndexOf('.') + 1);
            if (fileExtension.ToLower().Contains("jpg") || fileExtension.ToLower().Contains("png"))
            {
                if (AsyncFileUpload1.FileContent.Length < 2000000)
                {
                    String savePath = MapPath("profilePics/" + AsyncFileUpload1.FileName);

                    string formnum = "";

                    string origPath = MapPath("profilePics/" + formnum + ".jpg");
                    AsyncFileUpload1.SaveAs(origPath);
                    // File.AppendAllText("C:/lg.txt", "\r\n"+savePath);
                    AsyncFileUpload1.SaveAs(savePath);

                    var image = new Bitmap(MapPath("profilePics/" + formnum + ".jpg"));
                    if (image.Height > 200 || image.Width > 200)
                    {
                        Console.Write("IMAGE DIMENSION LARGE PROCESSING IMAGE");
                        //var image2 = ResizeImage(image, 200, 200);
                        //image.Dispose();
                        //image = null;
                        //File.Delete(origPath);
                        //image2.Save(origPath);
                        //image2.Dispose();
                        //image2 = null;

                    }
                    else
                    {
                        //Console.Write("IMAGE DIMENSION SMALL SKIPPING IMAGE");
                        image.Dispose();
                        image = null;
                    }

                    // AsyncFileUpload1.SaveAs(MapPath("C:/AdmissionPortal/Students/profilePics/" + AsyncFileUpload1.FileName));
                    //   literealErrorImage.Text = "";
                    UploadFolderPath = "profilePics/";
                    ViewState["imageDisplay_str"] = formnum + "." + fileExtension;
                }
                else
                {
                    ClearContents(sender as Control);
                    //   literealErrorImage.Text = " <span class=\"btn btn-danger\">Image file size should be less than 2 MB </span>";

                }
            }

        }


    }
开发者ID:EezeSolutions,项目名称:Higher_Erp,代码行数:57,代码来源:Register.aspx.cs


示例19: RatingControlChanged

        protected void RatingControlChanged(object sender, AjaxControlToolkit.RatingEventArgs e)
        {
            con.Open();
            SqlCommand cmd = new SqlCommand("insert into RatingDetails(Rate)values(@Rating)", con);
            cmd.Parameters.AddWithValue("@Rating", ratingControl.CurrentRating);
            cmd.ExecuteNonQuery();
            con.Close();
            BindRatingControl();

        }
开发者ID:tannm2705,项目名称:WebBanDT,代码行数:10,代码来源:UserRating.aspx.cs


示例20: AjaxFileUpload1_UploadComplete

 protected void AjaxFileUpload1_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
 {
     string TenAnh = e.FileName;
     String[] strTmp = TenAnh.Split('.');
     TenAnh = DateTime.Now.ToFileTimeUtc().ToString();
     TenAnh += "."+strTmp[1];
     string strDestPath = Server.MapPath("~/imagesTmp/");
     AjaxFileUpload1.SaveAs(@strDestPath + TenAnh);
     anh = "imagesTmp/" + TenAnh;
 }
开发者ID:san93st,项目名称:Cay_Thuoc_VN,代码行数:10,代码来源:search-anh.aspx.cs



注:本文中的AjaxControlToolkit类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AjaxOptions类代码示例发布时间:2022-05-24
下一篇:
C# AgilityPackHelper类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap