Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

ctlqt12

@ctlqt12
About
Posts
44
Topics
29
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Validator.ValidateProperty always throw error and application is exited
    C ctlqt12

    Hi all, I checked the validation for my form by using DataAnnotations. [Required(ErrorMessage="User Name is Required")] [StringLength(12,MinimumLength=6,ErrorMessage="User Name must be in between 6 to 12 Characters")] public string UserName { get { return _UserName; } set { Validator.ValidateProperty(value, new ValidationContext(this, null, null) { MemberName="UserName"}); _UserName = value; } } The error is always throwed at [Validator.ValidateProperty] and applicaton is stopped!! why on my friend's PC is not and the error message is displayed near the textbox normally. The strange is any source code that i got from internet or from my friend's PC is run normally with DataAnotation. But when i clean project and build it again, the application always throw error ( like : value is required ... ) at Validator.ValidateProperty and application is exited ( or stop running ) How could i solve it ?

    WPF help question

  • cross-domain in WCF
    C ctlqt12

    Hi all, I have two projects in same solution : 1 WCF project and 1 silverlight project. WCF project start at port : 54432 Silverlight project start at port : 55647 i deploy WCF project on IIS and copy ClientAccessPolicy.xml and CrossDomain.xml into wwwroot folder. From SL project, i add reference service to WCF on IIS. It's run. But from SL project, i add reference service to WCF project in same solution and run. I found the error about cross-domain. I already added ClientAccessPolicy.xml and CrossDomain.xml into the root of WCF project. The same error is displayed. Could you please guide me to solve it? Any helps will be welcomed

    WPF csharp wcf windows-admin xml help

  • get control name in a canvas
    C ctlqt12

    I solve it. Thank you for your support !

    WPF question learning

  • get control name in a canvas
    C ctlqt12

    Hi all, I have a canvas ( naming cn ) with MouseButtonDown event, i also have three textblocks in it. When i press a textblock in canvas, the event is raised with the sender is canvas ( of course ). How could i get the name of clicked-textblock ?

    WPF question learning

  • why wcf use basicHttpBinding instead of wsHttpBinding
    C ctlqt12

    Hi all, I found several links for this but no definitive answer. Could you please tell me the reason

    WPF csharp wcf

  • call many method in CustomValidation
    C ctlqt12

    Hi all, I have a quantity attribute in a dataform and want to validate it.I also have two methods for validate it. Their name are : ValidateUnit and ValidateQuantity. But unfortunally i could only call one method for validate it by following below code :

    [CustomValidation(typeof(UnitValidation), "ValidateUnit")]
    public string Unit;
    .......

    How could i call two methods for validating Unit ?

    WPF question

  • silverlight, wcf and nhibernate
    C ctlqt12

    Hi all, I'm learning combine wcf and nhibernate in silverlight, i follow instruction of this link http://www.squarewidget.com/post/2010/02/NHibernate-101-Silverlight-4-with-NHibernate-2n.aspx for creating sample But i have an error about [Instrument is not mapping], i changed the hbm.xml file and run again. The error message is not changed. It seems the Instrument.hbm.xml is not read. Could you please help me to solve this problem? Or if you have any source code relate to silverlight, wcf and nhibernate, please give me. Any suggestion will be welcomed Regards, Tuan Lam

    WPF help csharp wcf com xml

  • Export data from gridview to csv file
    C ctlqt12

    Hope this will help you :

    private void OnExportGridToCSV(object sender, System.EventArgs e)
    {
    	// Create the CSV file to which grid data will be exported.
    	StreamWriter sw = new StreamWriter(Server.MapPath("~/GridData.txt"), false);
    
    	// First we will write the headers.
    	DataTable dt = m_dsProducts.Tables[0];
    	int iColCount = dt.Columns.Count;
    	for(int i = 0; i < iColCount; i++)
    	{
    		sw.Write(dt.Columns[i]);
    		if (i < iColCount - 1)
    		{
    			sw.Write(",");
    		}
    	}
    	sw.Write(sw.NewLine);
    
    	// Now write all the rows.
    	foreach (DataRow dr in dt.Rows)
    	{
    		for (int i = 0; i < iColCount; i++)
    		{
    			if (!Convert.IsDBNull(dr[i]))
    			{
    				sw.Write(dr[i].ToString());
    			}
    			if ( i < iColCount - 1)
    			{
    				sw.Write(",");
    			}
    		}
    		sw.Write(sw.NewLine);
    	}
    	sw.Close();
    }
    
    C# csharp css question

  • auto email generation
    C ctlqt12

    Hi chandra_77, For sending mail in ASP.Net 2.0 ( C# ), you can use the following code using System.Web.Mail; MailMessage mail = new MailMessage(); mail.To = "mail.From = "sender's mail"; mail.Subject = ""; mail.Body = ""; SmtpMail.SmtpServer = ""; SmtpMail.Send(mail); Hoping this will help you ^^

    ASP.NET csharp oracle help

  • customize the datatable
    C ctlqt12

    Hi Basheer, If you want to customize datatable, you can get table by following code : ds.Tables[0] //ds is dataset When you get table in dataset, you can do anything with that table Hoping this will help you ^^

    ASP.NET database tutorial question

  • Each row of gridview is a treeview [modified]
    C ctlqt12

    Hi all, I have a array of treeview, and i want to display that array on GridView that each row of GridView is a treeview. Ex :

    + John Details

    • Age : 12
    • Sex : Male
    • Peter Details
      • Age : 14
      • Sex : Male
    • Jes Details
      • Age : 15
      • Sex : Female
        ........

    Like display QA in this website. How could i do that? -- modified at 11:36 Tuesday 18th September, 2007

    ASP.NET data-structures beta-testing question

  • Create and add event for linkbutton
    C ctlqt12

    Hi all, I have a form with a button and a textbox. When i click button, linkbutton will be create on form. When i click linkbutton, "Hello" will be filled into textbox.

    protected void Button1_Click(object sender, EventArgs e)
    {
       LinkButton lbtn = new LinkButton();
       lbtn.ID = "MyLinkButton";
       lbtn.Text = "Welcome";
       lbtn.Command += new CommandEventHandler(lbtn_Command);
       form.Controls.Add(lbtn);
    }
    
    
    protected void lbtn_Command(object sender, CommandEventArgs e)
    {
       txt.Text = "Hello";
    }
    

    But when i click LinkButton, Command event is not raised. What can i do to raise Command event of LinkButton?

    ASP.NET question

  • GridView, set parameters in HyperLinkField's NavigateUrl
    C ctlqt12

    Hi all, I have a GridView (grv) that contain a HyperLinkField ( "MyLink" ). I have a DataTable (dt) that contain data for GridView. ( I don't use SqlDataSource ) When i click "MyLink", "MyLink"'s NavigateUrl will be Default.aspx?id=param1&idU=param2. How could i do that?

    ASP.NET question

  • Gridview paging row
    C ctlqt12

    Hi all, Could i change the row of GridView that is used for displaying paging like following :

    | | 1 2 3 4 5 6 7 | 20 |
    | ID | NAME |
    | 01 | Kate |
    | 02 | Jessica |
    | 03 | Tom |
    | 04 | Han |

    It means in paging row, could i add a button or something else?

    ASP.NET question

  • Problem connect database via IIS 5.1
    C ctlqt12

    Hi all, I have a problem when deploy a website on IIS. When i deploy and run website through VS2005, i got no problem but when i run that website on IIS, i have error that website can't connect to database. Please help me to solve that error

    ASP.NET help database windows-admin

  • Framework for developing ASP.NET
    C ctlqt12

    Hi all, Spring.Net is not only too configurable but also it doesn't really have the structure of files for validation, database, .... Why i need something that sits on top of that? Because when i use ASP.Net framework, I don't have good structure of files and interacting between files Example : + Validation + Transaction + Database ...... So i need a framework that already has structure of files and when i write a file, i know where i put it.

    Web Development csharp java asp-net

  • Framework for developing ASP.NET
    C ctlqt12

    Hi all, I want to make a framework for developing ASP.NET and i see Spring.Net. But i think Spring.Net is not good. Because it has too much configs. If you know a framework that can be used for developing ASP.NET, please let me know. Thanks

    Web Development csharp java asp-net

  • If we have ASP.NET AJAX, why should we learn Ajax?
    C ctlqt12

    Hi all, I'm newbie of ASP.NET, and i want to use Ajax in ASP.NET. But i realize that Ajax is supported in ASP.NET by ASP.NET AJAX. And if i want to use Ajax, i just put that control to UpdatePanel. And i think the security of ASP.NET AJAX is better than i write a file with tranditional Ajax Therefore, i don't know why should we learn Ajax when i have ASP.NET AJAX. Please let me know why should i learn Ajax?

    ASP.NET csharp asp-net security question

  • count of rows in datarow
    C ctlqt12

    Hello, you can try this If dr Is Nothing Then ' dr is DataRow MessageBox.Show("Row has no value") Else MessageBox.Show("Row has value") End If

    Visual Basic question

  • count of rows in datarow
    C ctlqt12

    Hello, You can try this : Dim dr() As DataRow dr = ds.Tables(0).Select("id > 'o'") 'ds is a DataSet If (dr.GetLenght(0) = 0) then 'Has no row Else 'Has row End if

    Visual Basic question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups