|
Well, I could down your figure. Any other address?
|
|
|
|
|
|
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();
}
}
|
|
|
|
|
Message Removed
modified 3-Dec-13 16:51pm.
|
|
|
|
|
Closing pre tag has the forward slash in the wrong place.
Veni, vidi, abiit domum
|
|
|
|
|
|
This is not a valid question. You need to go and do some research into the various controls you are trying to implement, or think about employing someone who knows them already. No one here is going to write the code for you.
Veni, vidi, abiit domum
|
|
|
|
|
I have this code
Date = Convert.ToDateTime(ds1.Tables[0].Rows[i].ItemArray[1])
in which ds1.Tables[0].Rows[1].ItemArray[1] holds 2013-11-28 10:20:30.783
But when I write this variable value Date to excel spreadsheet, I'm seeing value like this 41606.4350485301 on excel where it should be the date stored in my dataset. Why is that?
|
|
|
|
|
Excel is a notorious PITA when it comes to date formats and .Net
I strongly recommend injecting date data into excel as a string formatted in the current fashion: dd-MMM-yyyy
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Excel has formatted the column as a numeric and not a datetime
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
The column is in fact formatted as date time when I right click one datetime cell and check, it is formatted as date time.
|
|
|
|
|
If it's really a datetime value need in Excel then I think you may need to reduce the granularity of the time by removing milliseconds in from .Net side rather than pasing it through as a datetime.
In other words format it as a string in this format dd/mm/yyyy hh:mm then set the Excel format to a custom format of dd/mm/yyyy hh:mm.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
|
That is standard value type for dates and times in Excel. If you reformat the cell as a Date it shows 28/11/2013 , and if you format it as a time it shows 10:26:28 .
Veni, vidi, abiit domum
|
|
|
|
|
I'm working on a project and there is 2 classes named 'Utility' & 'ServerUtils' both static and in the same namespace but in separate files.
namespace HeadName.ProcessFiles
{
public static class ServerUtils
{
}
}
namespace HeadName.ProcessFiles
{
public static class Utility
{
}
}
now assume that there is two another classes which need to use 'utility' & 'ServerUtils'.
namespace HeadName.ProcessFile.Rating
{
public class Calculator
{
}
}
namespace HeadName.ProcessFile.Rating
{
public class Server
{
}
}
Problem was just here, VS didn't show the Utility class when i
type "HeadName.ProcessFile." but ServerUtils was there. not only on my pc...
when i complete the code by hand IDE draw a red line under it saying there is not such thing. i decide to compile and see what will happen. no compile error. . i add a number to the end of class's name to be sure and compiler show error. so this is about IDE not my code. after some works my colleage deletes user file near project file, Prblem solved. but on my pc there was none and we think deleting .suo file near solution file may help and it did work.
the question is why? and what is this? did i do something wrong or it's VS problem.
bad english, I know
|
|
|
|
|
As per the code above, the namespace seems to be "HeadName.ProcessFiles".
So you should try with that.
|
|
|
|
|
For the why:
This is probably an issue with IntelliSense and its cache. It gets refreshed when you delete the .suo file. I'm not really sure where or how you can manually tell VS to refresh the IntelliSense cache. Some report of finding such an option under Edit -> IntelliSense -> Refresh Local Cache. However I can't find such an option in my copy of VS
|
|
|
|
|
ServerUtils and Utility are defined in the namespace 'HeadName.ProcessFiles: the other namespace is 'HeadName.ProcessFile.
The spelling difference is causing your problem.
"What Turing gave us for the first time (and without Turing you just couldn't do any of this) is he gave us a way of thinking about and taking seriously and thinking in a disciplined way about phenomena that have, as I like to say, trillions of moving parts.
Until the late 20th century, nobody knew how to take seriously a machine with a trillion moving parts. It's just mind-boggling." Daniel C. Dennett
|
|
|
|
|
thx alot for all replies.
|
|
|
|
|
I have this quote where I need to get float value stored in table cells of dataset and assign it to fValue.
fValue= (float) ds1.Tables[0].Rows[1].ItemArray[2]
This gives me the error "Specified cast is not valid." So I tried sth like below and it works.
fValue= 9.99f
Why is that? Should I change the data type of fValue or append 'f' to ds1.Tables[0].Rows[1].ItemArray[2] and cast (float) back? The later looks silly and doesn't work anyway.
Could someone explain that to me please?
modified 2-Dec-13 3:01am.
|
|
|
|
|
Try Convert.ToSingle() instead of a direct cast.
e.g. Convert.ToSingle(ds1.Tables[0].Rows[1].ItemArray[2])
|
|
|
|
|
Try this:
fValue=float.Parse(ds1.Tables[0].Rows[1].ItemArray[2])
|
|
|
|
|
As we know that when inner transaction will commit and outer transaction is going to rollback then outer transaction also roll back to the inner transaction means there is no own scope of inner transaction then what is use of this.
Please explain me
Thanks,
Girijesh Kumar
|
|
|
|
|
This[^] explains the use nested transactions for you.
|
|
|
|
|
Don't think of it that way.
Turn it round, and you can roll back the inner transaction, and commit the outer one.
|
|
|
|