本文整理匯總了C#中AjaxControlToolkit類的典型用法代碼示例。如果您正苦於以下問題:C# AjaxControlToolkit類的具體用法?C# AjaxControlToolkit怎麽用?C# AjaxControlToolkit使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
AjaxControlToolkit類屬於命名空間,在下文中一共展示了AjaxControlToolkit類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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();
}
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例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();
}
示例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"));
}
示例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);
}
}
示例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();
}
}
}
示例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;
}
示例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;
}
示例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);
}
}
}
示例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); }
}
示例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 { }
}
示例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);
}
}
示例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);
}
}