|
What value is returned in temp?
Do you have the stored procedure code?
A message that something didn't work is not very helpful - you need to debug to find any return messages or error codes
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
1. Your first 3 parameters are defined as integer but you are passing a string.
2. Why are you converting a Textbox.Text to string? e.g Textbox.Text.ToString()
Have you tried to run the stored procedure directly on the server with some dummy values? if so did it work sucessfully or did it throw an error?
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
The cmd.ExecuteNonQuery should return the number of rows affected by the command on UPDATE statement in this case if you are getting this message "Your info modification failed " means that for some reason the SP is not updating or is passing null values in the parameters could ya please share the content of the SP that way we can give a more precise solution.
|
|
|
|
|
when i connect Access database its connect properly but the data is saved on bin folder data base, and recored are not inserted n main database please help any one
my app.config file is
<configuration>
<configsections>
<connectionstrings>
<add name="EQMS.Properties.Settings.EQMSConnectionString" connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\EQMS.mdb;Persist Security Info=True;Jet OLEDB:Database Password=ashaashwin"
="" providername="System.Data.OleDb">
<appsettings>
<add key="con" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=EQMS.mdb;Jet OLEDB:Database Password=ashaashwin;">
|
|
|
|
|
You might want to format your question a bit better - some of that got lost when displayed.
|
|
|
|
|
you need to explain the problem more clearly!
at a guess I would suggest that you look at the connection objects / strings that you are using to save the data at, I would use that as a starting point to solving this.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
what type of error you getting.
|
|
|
|
|
I wanna to convert this string :
"
if("2" == "2" && "10" >="9")
return "true";
else
return "false";
if the above string contains any of these :
>= , <= , > , <
Replace the part of string ( "10" >= "9") TO :
( 10 >= 9)
So the final string would be :
if("2" == "2" && 10 >=9 )
return "true";
else
return "false";
How is it possible.
note : the string may contain lot of these math operation in it .
|
|
|
|
|
Create a token parser. So, start at the beginning of the string and work your way over it looking for the strings you're interested in. You could do this with a regex and some fancy parsing, but I would keep it simple if I were you. There are some shortcuts that you can take, such as only needing to store the right hand side of the token if the operators are the ones you are interested in. I would also look to split my string up into an array of smaller strings using the && and || operators. Then, I would perform my search on the smaller arrays.
|
|
|
|
|
If the text will contain proper spacing..You may use 'Contains ()'.
<pre>
string strMyText = "There is some text like 10 > 9";
if(strMyText .Contains("10 >9"))
{
strMyText = "I got it"
}</pre>
|
|
|
|
|
Okay, two things:
1. The OP does not get notified of answers to someone other than them.
2. Your solution does not even begin to address what the OP has asked for. Take a look at his question again and ask yourself if you have really answered it.
|
|
|
|
|
|
I doubt anyone (who knows what goes on with Crocko) is going to click that link.
Find a better place to host your image, such as Flickr.
|
|
|
|
|
|
"This photo is currently unavailable".
|
|
|
|
|
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
|
|
|
|