Click here to Skip to main content
15,890,186 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to convert ... Pin
Pete O'Hanlon6-Dec-13 0:54
mvePete O'Hanlon6-Dec-13 0:54 
QuestionFind examples MDI Parent Child Form Load as shown in Figure Pin
Member 24584673-Dec-13 17:47
Member 24584673-Dec-13 17:47 
AnswerRe: Find examples MDI Parent Child Form Load as shown in Figure Pin
Dave Kreskowiak3-Dec-13 18:16
mveDave Kreskowiak3-Dec-13 18:16 
GeneralRe: Find examples MDI Parent Child Form Load as shown in Figure Pin
Member 24584674-Dec-13 21:57
Member 24584674-Dec-13 21:57 
GeneralRe: Find examples MDI Parent Child Form Load as shown in Figure Pin
Dave Kreskowiak5-Dec-13 2:43
mveDave Kreskowiak5-Dec-13 2:43 
AnswerRe: Find examples MDI Parent Child Form Load as shown in Figure Pin
WuRunZhe6-Dec-13 14:38
WuRunZhe6-Dec-13 14:38 
GeneralRe: Find examples MDI Parent Child Form Load as shown in Figure Pin
Member 24584678-Dec-13 17:58
Member 24584678-Dec-13 17:58 
Questionmodel popup extender is not displaying but it gets call from code behind Pin
Member 104297953-Dec-13 0:29
Member 104297953-Dec-13 0:29 
here is my code
aspx code

<asp:UpdatePanel ID="UpdatePanel3" runat="server">
<ContentTemplate>
<div id="newsletter">
<p class="nlh">Newsletters Signup</p>

<div class="suf">

<%--<input name="signup" type="text" value="enter email address"/>--%>

<asp:TextBox ID="txt_newsletter" runat="server"></asp:TextBox>

<asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="txt_newsletter" WatermarkText="Enter Email Address">
</asp:TextBoxWatermarkExtender>

</div>


<%--<asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="txt_newsletter" ValidationExpression="^\s*(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+([;.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*\s*$" runat="server" ErrorMessage="Enter Valid Email Address" Style="float:left; position:relative;"></asp:RegularExpressionValidator>--%>
<div class="sub">
<%--<input name="" type="submit" value="SignUp"//> --%>
<asp:Button ID="btn_signup" runat="server" Text="Sign Up" onclick="btn_signup_Click" CausesValidation="false" />
<%--<input id="btn_showPopup" runat="server" type="button" value="button" style="display:none;" />--%>
<asp:HyperLink ID="btn_showPopup" runat="server" Style="display: none;" />

</div>


</div>

<!-------->

<div id="popupdiv_2" class="popupdiv_22" style="display:none" >
<div class="popupdivheader_2">
<div class="SignUp_heading">Gifto Travels</div>

</div>
<div class="SignUp_Error">
<asp:Label ID="lbl_popuop" runat="server" Text="Label" Visible="true">Please Enter A Valid Email Address</asp:Label>

</div>
<div class="PopUpDivContent">
<asp:Button ID="OkButton" runat="server" Text="OK" CausesValidation="true"
CssClass="SignUp_OkBtn" />
</div>

</div>
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="popupdiv_2"
OkControlID="OkButton" TargetControlID="btn_showPopup" BehaviorID="ModalBehaviour" BackgroundCssClass="ModalPopupBG" PopupDragHandleControlID="PopUpDivHeader">
</asp:ModalPopupExtender>

<div id="popupdiv_success" class="success_popupdiv_22" style="display: none">
<div class="success_popupdivheader_2">
<div class="success_SignUp_heading">
Thank You For Subscribing</div>
</div>

<div class="SignUp_success_message">
We will be back to your Email address with great deals and Cheapest Fares.
</div>
<div class="PopUpDivContent">
<asp:Button ID="success_OkButton" runat="server" Text="OK" CausesValidation="true"
CssClass="success_SignUp_OkBtn" />
</div>
</div>
<asp:ModalPopupExtender ID="ModalPopupExtender2" runat="server" PopupControlID="popupdiv_success"
OkControlID="success_OkButton" TargetControlID="btn_showPopup" BehaviorID="ModalBehaviour"
BackgroundCssClass="ModalPopupBG" PopupDragHandleControlID="PopUpDivHeader">
</asp:ModalPopupExtender>


</ContentTemplate>
</asp:UpdatePanel>


and here is my code behind


if (txt_newsletter.Text == "" || txt_newsletter.Text == string.Empty)
{

//ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert(' Please Enter Valid Email Address')", true);

//ScriptManager.RegisterStartupScript(this, this.GetType(), "OnClientClicking", "ShowPopUp_verifyInventory();", true);

ModalPopupExtender1.Show();
}
else
{
if (txt_newsletter.Text != null || txt_newsletter.Text != "")
{


if (Validation.ValidateEmail(txt_newsletter.Text))

{

using (SqlConnection conn = DataAccess.GetConnected())
{
SqlCommand cmd = new SqlCommand("news_letter_email ", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@email_address", txt_newsletter.Text);
//cmd.Parameters.AddWithValue("@id", 0);
//-----message---------------
cmd.Parameters.Add(new SqlParameter("@message", SqlDbType.VarChar, 400));
cmd.Parameters["@message"].Direction = ParameterDirection.Output;
cmd.ExecuteNonQuery();
message = cmd.Parameters["@message"].Value.ToString();

//ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('" + message + "')", true);
ModalPopupExtender2.Show();
}

}
AnswerMessage Removed Pin
3-Dec-13 9:44
professionalN_tro_P3-Dec-13 9:44 
SuggestionRe: model popup extender is not displaying but it gets call from code behind Pin
Richard MacCutchan3-Dec-13 10:36
mveRichard MacCutchan3-Dec-13 10:36 
Questionregarding sitemap functionality Pin
Omprakash Kukana2-Dec-13 18:06
Omprakash Kukana2-Dec-13 18:06 
GeneralRe: regarding sitemap functionality Pin
Richard MacCutchan2-Dec-13 21:15
mveRichard MacCutchan2-Dec-13 21:15 
Question[Solved] Date is displayed as 41606.4350485301 and not 2013-11-28 10:20:30.783 ! Pin
emma.sun.sts1-Dec-13 21:24
emma.sun.sts1-Dec-13 21:24 
AnswerRe: Date is displayed as 41606.4350485301 and not 2013-11-28 10:20:30.783 ! Pin
GuyThiebaut1-Dec-13 21:43
professionalGuyThiebaut1-Dec-13 21:43 
AnswerRe: Date is displayed as 41606.4350485301 and not 2013-11-28 10:20:30.783 ! Pin
Mycroft Holmes1-Dec-13 21:51
professionalMycroft Holmes1-Dec-13 21:51 
GeneralRe: Date is displayed as 41606.4350485301 and not 2013-11-28 10:20:30.783 ! Pin
emma.sun.sts1-Dec-13 21:59
emma.sun.sts1-Dec-13 21:59 
GeneralRe: Date is displayed as 41606.4350485301 and not 2013-11-28 10:20:30.783 ! Pin
GuyThiebaut1-Dec-13 22:24
professionalGuyThiebaut1-Dec-13 22:24 
GeneralRe: Date is displayed as 41606.4350485301 and not 2013-11-28 10:20:30.783 ! Pin
emma.sun.sts4-Dec-13 15:28
emma.sun.sts4-Dec-13 15:28 
AnswerRe: Date is displayed as 41606.4350485301 and not 2013-11-28 10:20:30.783 ! Pin
Richard MacCutchan1-Dec-13 23:46
mveRichard MacCutchan1-Dec-13 23:46 
QuestionProblem resolving namespace Pin
mirdana1-Dec-13 21:06
mirdana1-Dec-13 21:06 
AnswerRe: Problem resolving namespace Pin
Sampath Sridhar1-Dec-13 22:16
Sampath Sridhar1-Dec-13 22:16 
AnswerRe: Problem resolving namespace Pin
Nicholas Marty1-Dec-13 23:42
professionalNicholas Marty1-Dec-13 23:42 
AnswerRe: Problem resolving namespace Pin
BillWoodruff1-Dec-13 23:53
professionalBillWoodruff1-Dec-13 23:53 
AnswerRe: Problem resolving namespace Pin
mirdana2-Dec-13 22:25
mirdana2-Dec-13 22:25 
Question[Solved] Specified cast is not valid: assigning float values 0.00 vs 0.00f Pin
emma.sun.sts1-Dec-13 20:29
emma.sun.sts1-Dec-13 20:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.