เขียน Code ของ Web App ยังไงให้แสดงรูปใน Crystal Report จาก File Path ในฐานข้อมูล
2 posters
หน้า 1 จาก 1
เขียน Code ของ Web App ยังไงให้แสดงรูปใน Crystal Report จาก File Path ในฐานข้อมูล
เรียนอาจารย์ ผมติดตามผลงาน หนังสือทั้ง 2 เล่ม เป็นหนังสือที่ดีมาก
ผมได้ใช้ประโยชน์จากหนังสือคุ้มค่าไม่เสียดายเงิน ไม่ว่าจะเป็นใช้ในการทำงานและการเรียน
ขอบคุณจริงๆ ครับสำหรับความรู้ ทั้งในหนังสือและบทความบนเว็บ
และกำลังเก็บตังไปเรียนกับอาจารย์ เรียนกับผู้รู้ 1 วันเท่ากับศึกษาเอง 100 วัน ฮ่าๆๆ
ตัวอย่างของ Win App
http://greatfriends.biz/webboards/msg.asp?id=64774
ปัญหาคือ Application.StartupPath ใน WebApp ใช้งานไม่ได้
อาจารย์ช่วยเขียน แบบ WebApp ให้เป็นแนวทาง
มือใหม่ ครับ
decha- จำนวนข้อความ : 7
Join date : 15/12/2010
ลองแบบนี้
ลองแบบนี้แล้วยังครับ
//get the full location of the assembly with DaoTests in it
string fullPath = System.Reflection.Assembly.GetAssembly(typeof(DaoTests)).Location;
//get the folder that's in
string theDirectory = Path.GetDirectoryName( fullPath );
//get the full location of the assembly with DaoTests in it
string fullPath = System.Reflection.Assembly.GetAssembly(typeof(DaoTests)).Location;
//get the folder that's in
string theDirectory = Path.GetDirectoryName( fullPath );
Re: เขียน Code ของ Web App ยังไงให้แสดงรูปใน Crystal Report จาก File Path ในฐานข้อมูล
//get the full location of the assembly with DaoTests in it
string fullPath = System.Reflection.Assembly.GetAssembly(typeof(DaoTests)).Location;
//get the folder that's in
string theDirectory = Path.GetDirectoryName( fullPath );
DaoTests มันคืออะไรครับ
แล้วจะใส่ sdr["PhotoPath"].ToString(); ตรงไหนครับ
string fullPath = System.Reflection.Assembly.GetAssembly(typeof(DaoTests)).Location;
//get the folder that's in
string theDirectory = Path.GetDirectoryName( fullPath );
DaoTests มันคืออะไรครับ
แล้วจะใส่ sdr["PhotoPath"].ToString(); ตรงไหนครับ
decha- จำนวนข้อความ : 7
Join date : 15/12/2010
เอาใหม่
ลอง
string myPath = Application.ExecutablePath();
หรือ
string myPath = Application.StartupPath();
หรือ
string myPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location))
string myPath = Application.ExecutablePath();
หรือ
string myPath = Application.StartupPath();
หรือ
string myPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location))
Re: เขียน Code ของ Web App ยังไงให้แสดงรูปใน Crystal Report จาก File Path ในฐานข้อมูล
ขอบคุณมากครับอาจารย์
ผมลืมบอกไปว่าเก็บ Folder งานไว้ที่ wwwroot แล้ว Run ผ่าน IIS
เลยใช้
string myPath = Server.MapPath(sdr["PhotoPath"].ToString());
ผมลืมบอกไปว่าเก็บ Folder งานไว้ที่ wwwroot แล้ว Run ผ่าน IIS
เลยใช้
string myPath = Server.MapPath(sdr["PhotoPath"].ToString());
decha- จำนวนข้อความ : 7
Join date : 15/12/2010
Similar topics
» เขียน Asp.net แบบธรรมดา กับ แบบ MVC แบบไหนดีกว่ากันครับ
» เขียน จับภาพบนหน้าจอด้วย asp.net ตอนเทสที่เครื่องปกติแต่พอลง server มีอาการ error ครับ อาจารย์
» การนำ rdl file ไปใช้
» A get or set accesser expected ขึ้นบอกแต่ไม่รู้ว่าตรงไหน
» สงสัย source code ในหนังสือ oop c#
» เขียน จับภาพบนหน้าจอด้วย asp.net ตอนเทสที่เครื่องปกติแต่พอลง server มีอาการ error ครับ อาจารย์
» การนำ rdl file ไปใช้
» A get or set accesser expected ขึ้นบอกแต่ไม่รู้ว่าตรงไหน
» สงสัย source code ในหนังสือ oop c#
หน้า 1 จาก 1
Permissions in this forum:
คุณไม่สามารถพิมพ์ตอบ
|
|