ASP .NET - Configure SQLDataSource to use MySQL .NET Connector

前端 未结 4 506
日久生厌
日久生厌 2021-01-23 15:40

I am using VS 2008.

Looking around on the forums/stack hasn\'t provided a clear answer on how to use MySQL with a ASP .NET site.

How do I configure a SQLDataSour

4条回答
  •  佛祖请我去吃肉
    2021-01-23 16:08

    The only way I could get the design time binding to work was to use the ODBC driver. the .Net driver simply would not work. You have to install the MySQL ODBC driver, restart visual studio, then add connection string to web.config.

    In Web.Config:

    
    
    
    

    In ASPX:

    
        
        
            
            
        
        
        
            
                
            
            
            
            
            
            
            
            
            
        
        
    
    
        
            
        
        
            
            
            
            
            
        
        
            
            
            
            
            
        
    
    

提交回复
热议问题