تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] wep application
#1
اين يكتب ال connection code في web application باستخدام vb.net هل في صفحة ال aspx ام في موديول
الرد }}}
تم الشكر بواسطة:
#2
كود :
You can write it Webconfig, Class , Module, xx.vb, or  in page markup,
But  we have not Modules exist in Asp.ney items we need to create it
in webconfig your connection string will be like this
  <connectionStrings>
    <add name="MyConnection" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=database;Integrated Security=True"
</connectionStrings>
*Add class 
rename it  module1
inside code change " Class1 to module1"
now ready to use 
Public Module Module1


End Module
* in xx.vb
            SqlDataSource1.ConnectionString = "Data Source=.\SQLEXPRESS;Initial Catalog=database;Integrated Security=True"
*Markup we need type
<Script>
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
here our connection string like this 
   SqlDataSource1.ConnectionString = "Data Source=.\SQLEXPRESS;Initial Catalog=database;Integrated Security=True"
end sub
</Script>

 
Best wishes
سبحان الله والحمدلله ولا إله إلا الله والله أكبر
 اللهم اغْفِرْ لِلمؤمنين والمؤمنات والمسلمين والمسلمات الأحياء منهم والأموات
الرد }}}
تم الشكر بواسطة:


المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
Exclamation اعدادات التطبيق application settings ims.ataya 2 2,074 01-09-23, 04:36 AM
آخر رد: اسامه الهرماوي
  [VB.NET] how to create mobile phone flashing application develop muhammadidris 0 182 03-01-23, 10:58 PM
آخر رد: muhammadidris
  مشكلة عندالتعامل مع (My.Application.CommandLineArgs) عبدالله الصافي 12 2,891 21-04-21, 03:17 PM
آخر رد: عبدالله الصافي
  Application.OpenForms لا تاتي بجميع الفورم المفتوحة ali.alfoly 3 1,887 18-03-18, 01:05 AM
آخر رد: ali.alfoly
  أرغب في مشاريع جاهزة ASP.NET web application VB.NET من أجل التعلم +مواقع تعليمية AbdullahProg 4 6,917 23-08-17, 01:32 PM
آخر رد: AbdullahProg
  [VB.NET] هل كود : Windows Forms Application يعمل على ASP.NET web application ، والعكس AbdullahProg 1 1,659 22-08-17, 02:45 PM
آخر رد: حريف برمجة
  [سؤال] الانتقال من windows application إلى web application اليوم مبتدئة وغداً محترفة 0 1,520 22-03-17, 04:33 AM
آخر رد: اليوم مبتدئة وغداً محترفة
  [VB.NET] الانتقال من windows application إلى web application (((تم إضافة درس))) اليوم مبتدئة وغداً محترفة 6 3,137 14-03-17, 02:36 PM
آخر رد: اليوم مبتدئة وغداً محترفة
  سؤال فى console application Mohamed20 2 1,849 11-03-17, 01:06 AM
آخر رد: Mohamed20
  [VB.NET] استفسار بخصوص بيئة commend Window و بيئة Console Application اوتار محترقة 1 1,809 18-03-16, 02:01 PM
آخر رد: اوتار محترقة

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم