Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > .NET Framework > Forum > ajax control toolkit ModalPopupExtender popup message by yourself



 

ajax control toolkit ModalPopupExtender popup message by yourself

 



Topic : 104641



โพสกระทู้ ( 5 )
บทความ ( 0 )



สถานะออฟไลน์




Code
<asp:UpdatePanel runat="server" ID="upMain"> <ContentTemplate> <%--Message popup area start--%> <asp:Button runat="server" ID="btnMessagePopupTargetButton" Style="display: none;" /> <ajaxToolkit:ModalPopupExtender ID="mpeMessagePopup" runat="server" PopupControlID="pnlMessageBox" TargetControlID="btnMessagePopupTargetButton" OkControlID="btnOk" CancelControlID="btnCancel" BackgroundCssClass="MessageBoxPopupBackground"> </ajaxToolkit:ModalPopupExtender> <asp:Panel runat="server" ID="pnlMessageBox" BackColor="White" Width="420" Style="display: none; border: 2px solid #780606;"> <div class="popupHeader" style="width: 420px;"> <asp:Label ID="lblMessagePopupHeading" Text="Information" runat="server"></asp:Label><asp:LinkButton ID="btnCancel" runat="server" Style="float: right; margin-right: 5px;">X</asp:LinkButton> </div> <div style="max-height: 500px; width: 420px; overflow: hidden;"> <div style="float: left; width: 380px; margin: 20px;"> <table style="padding: 0; border-spacing: 0; border-collapse: collapse; width: 100%;"> <tr> <td style="text-align: left; vertical-align: top; width: 11%;"> <asp:Literal runat="server" ID="ltrMessagePopupImage"></asp:Literal> </td> <td style="width: 2%;"> </td> <td style="text-align: left; vertical-align: top; width: 87%;"> <p style="margin: 0px; padding: 0px; color: #5F0202;"> <asp:Label runat="server" ID="lblMessagePopupText"></asp:Label> </p> </td> </tr> <tr> <td style="text-align: right; vertical-align: top;" colspan="3"> <div style="margin-right: 0px; float: right; width: auto;"> <asp:LinkButton ID="btnOk" runat="server" CssClass="popup_button">Ok</asp:LinkButton> </div> </td> </tr> </table> </div> </div> </asp:Panel> <%--Message popup area end--%> </ContentTemplate> </asp:UpdatePanel>


++++++++++++++++++++++++
Code
body { } .MessageBoxPopupBackground { filter: Alpha(Opacity=40); -moz-opacity: 0.4; opacity: 0.4; width: 100%; height: 100%; background-color: #999999; position: absolute; z-index: 500001; top: 0px; left: 0px; } .popupHeader { float: left; padding: 5px 0px 0px 0px; width: 420px; font-family: tahoma; font-weight: bold; height: 25px; text-decoration: none; background-image: url("images/tab_top.jpg"); background-repeat: repeat-x; color: #FFFFFF; } .popupHeader span { color: #fff; text-decoration: none; line-height: 15px; text-decoration: none; float: left; margin-left: 10px; } .popupHeader a { color: #fff !important; text-decoration: none !important; line-height: 15px; text-decoration: none; float: right; margin-right: 10px; } .popup_button { color: #fff !important; font-family: arial, Geneva, sans-serif; font-size: 12px; font-weight: normal; text-decoration: none !important; width: auto; background-image: url('images/btn_ok.jpg'); background-repeat: repeat-x; /*height: 24px;*/ line-height: 22px; padding: 3px 15px 3px 15px; float: left; margin: 0px 0px 0px 5px; }


+++++++++++++++++++++++++++++++++
Code
Public Sub ShowPopupMessageDuck(ByVal message As String) lblMessagePopupHeading.Text = "Error" ltrMessagePopupImage.Text = "<img src='" + Page.ResolveUrl("~/images/exclaim.gif") + "' alt='' />" lblMessagePopupText.Text = message mpeMessagePopup.Show() End Sub




Tag : .NET, Ajax, Web (ASP.NET), VB.NET, VS 2008 (.NET 3.x)







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2014-01-15 17:58:16 By : easyduck View : 1464 Reply : 3
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook








แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-01-16 09:13:54 By : mr.win
 


 

No. 2



โพสกระทู้ ( 5 )
บทความ ( 0 )



สถานะออฟไลน์


หน้า masterpage เขียน method เพื่อส่งค่าในแต่ละ control

Code
Public ReadOnly Property DropDownValue() As String Get Return DropDownList1.Text End Get End Property Public ReadOnly Property TextBoxValue() As String Get Return TextBox1.Text End Get End Property


หน้า ที่เรียกใช้
สามารถเรียกใช้ได้ 2 วิธีคือ
วิธีที่ 1
Label1.Text = CType(Master.FindControl("DropDownList1"), DropDownList).SelectedValue

วิธีที่ 2
ในหน้า aspx ให้ใส่ ให้ใส่ MasterType ลงไปต่อจาก<%@ Page %>
จะได้ <%@ MasterType VirtualPath="~/MasterPage.master" %>
เพื่อจะได้ไม่ต้องใช้คำสั่ง Master.FindControl("")ใน code behind

เสร็จแล้วจะได้ดังตัวอย่าง
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" title="Untitled Page" %>
<%@ MasterType VirtualPath="~/MasterPage.master" %>

ในหน้า code behind เขียนแค่ Label1.Text = Master.DropDownValue ก็จะได้ค่ามา
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-05-06 21:04:48 By : easyduck
 

 

No. 3



โพสกระทู้ ( 5 )
บทความ ( 0 )



สถานะออฟไลน์


Protected Sub gv_production_group_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gv_production_group.RowDataBound
If objCenter.InListOR("'" & e.Row.RowIndex & "'", "'0','4','8','12','15'") Then
e.Row.BackColor = System.Drawing.Color.FromName("#FFCCCC")
End If

If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(13).Text = Convert.ToDouble( _
objCenter.ChkNullCDblReport(DataBinder.Eval(e.Row.DataItem, "1")) + _
objCenter.ChkNullCDblReport(DataBinder.Eval(e.Row.DataItem, "2")) + _
objCenter.ChkNullCDblReport(DataBinder.Eval(e.Row.DataItem, "3")) + _
objCenter.ChkNullCDblReport(DataBinder.Eval(e.Row.DataItem, "4")) + _
objCenter.ChkNullCDblReport(DataBinder.Eval(e.Row.DataItem, "5")) + _
objCenter.ChkNullCDblReport(DataBinder.Eval(e.Row.DataItem, "6")) + _
objCenter.ChkNullCDblReport(DataBinder.Eval(e.Row.DataItem, "7")) + _
objCenter.ChkNullCDblReport(DataBinder.Eval(e.Row.DataItem, "8")) + _
objCenter.ChkNullCDblReport(DataBinder.Eval(e.Row.DataItem, "9")) + _
objCenter.ChkNullCDblReport(DataBinder.Eval(e.Row.DataItem, "10")) + _
objCenter.ChkNullCDblReport(DataBinder.Eval(e.Row.DataItem, "11")) + _
objCenter.ChkNullCDblReport(DataBinder.Eval(e.Row.DataItem, "12"))).ToString("#,###")
End If

'If e.Row.RowType = DataControlRowType.Footer Then
' 'Dim lblTotal As Label = DirectCast(e.Row.FindControl("lbl_total_footer"), Label)
' 'lblTotal.Text = total.ToString()
' DataBinder.Eval(e.Row.DataItem, "1")
' DataBinder.Eval(e.Row.DataItem, "2")
' DataBinder.Eval(e.Row.DataItem, "3")
' DataBinder.Eval(e.Row.DataItem, "4")
' DataBinder.Eval(e.Row.DataItem, "5")
' DataBinder.Eval(e.Row.DataItem, "6")
' DataBinder.Eval(e.Row.DataItem, "7")
' DataBinder.Eval(e.Row.DataItem, "8")
' DataBinder.Eval(e.Row.DataItem, "9")
' DataBinder.Eval(e.Row.DataItem, "10")
' DataBinder.Eval(e.Row.DataItem, "11")
' DataBinder.Eval(e.Row.DataItem, "12")
'End If
End Sub

'Dim PV As String = "Data Source=ip;Network Library=DBMSSOCN;User ID=;Password=;"
'Dim PV As String = "Data Source=ip,1433;User ID=;Password=;"
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-05-21 18:28:12 By : easyduck
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ajax control toolkit ModalPopupExtender popup message by yourself
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 05
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่