|
Your question makes no sense: try to rephrase or get someone who speaks English to translate or you won't get an answer.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Based on the words used in your question, you have page-design issue. You need to share the related code to get some insight.
Surely English is not your first language. Please get someone who can write/frame a proper question for you such that you can get some help. For now, it's difficult to make much out of what you ask.
|
|
|
|
|
hello.
I have design a form with asp.net4 which is binded to Sqlserver 2008r2 , my form is made by Asp.Net formview that has to insert data into the database . i have also included my formview inside an UpdatePanel , but when press the insert button this exception in the is generated:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format.
this exception occures in a locked dynamic page: ScriptResource.axd
but whenever i remove the UpdatePanel from my form this exception doesn't occure again , but the other Unhandled exception occures :
(in fact i don't want to remove UpdatePanel)
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
<div style="display: block;" id="premain0" class="pre-action-link" width="100%">[FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9591147 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119 System.String.System.IConvertible.ToInt32(IFormatProvider provider) +46 System.Convert.ChangeType(Object value, TypeCode typeCode, IFormatProvider provider) +297 System.Web.UI.WebControls.Parameter.GetValue(Object value, String defaultValue, TypeCode type, Boolean convertEmptyStringToNull, Boolean ignoreNullableTypeChanges) +126 System.Web.UI.WebControls.Parameter.GetValue(Object value, Boolean ignoreNullableTypeChanges) +63 System.Web.UI.WebControls.SqlDataSourceView.AddParameters(DbCommand command, ParameterCollection reference, IDictionary parameters, IDictionary exclusionList, String oldValuesParameterFormatString) +550 System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary values) +306 System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +89 System.Web.UI.WebControls.FormView.HandleInsert(String commandArg, Boolean causesValidation) +377 System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +612 System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs e) +95 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source, EventArgs e) +112 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +125 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +167 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563</div>
someone said to me i should convert string datatype to int, but i don't know how & where should i modify the code ?
|
|
|
|
|
It's seems something issue with Data conversion. So check carefully for all data types wherever converting any input data.
One more thing:
Try to set the page attribute :
EnableEventValidation="false"
Parwej Ahamad
|
|
|
|
|
Hi,
As per my understanding, its a data convertion issue, its trying to convert from a string to int.
you can try below:
CAST(MyVarcharCol AS INT))
or
CONVERT(INT, MyVarcharCol)
|
|
|
|
|
You'll need to see what the actual value is. Step through with a debugger and/or add a try/catch to log the value somewhere.
|
|
|
|
|
I have a C# 201o web form application that I just deployed to a test server that is similar to the production server running iis 7. The entire website works fine but the screens only stay active for an inconsistent amount of time. The entire website throws you back to the main logon screen. Thus can you tell me what kind of a setting for the entire web site and/or iis server that needs to be changed so the server and /or application does not throw you out to the logon page after being on the website for 5 minutes or less?
|
|
|
|
|
|
This article says the default timeout for asp.net is 20 minutes. However, my website closes down after 3 to 5 minutes at the most.
Thus do you think something else could be wrong? Do I just need to set the session timeout value since I do not have the value set?
|
|
|
|
|
Verify Web.Config file, what the time is set for Form authentication tag?
Parwej Ahamad
|
|
|
|
|
dcof wrote: website throws you back to the main logon screen
This is like the 3rd time I read the question.
I didn't think much at first of the question because it did sound like a session issue.
So do you mean that if you navigate to a page, and sit in your chair and watch it, the page automatically navigates to the login screen?,
or if you get a phone call, and your talking on the phone, the page redirects?
dcof wrote: <layer>but the screens only stay active for an inconsistent amount of time.
Is the incosistent time always on the same computer?, or various computers.
|
|
|
|
|
Do you have an example with asp:Panel to look like tab control?
|
|
|
|
|
Tab control for ASP.NET Applications[^].
Good place to start: there are a few other similar articles.
There's also Google[^]
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
|
hello friends i am fresher i need real time example for using oops in asp.net with C# application..give me some code..
|
|
|
|
|
|
Start with some good samples on msdn.
You can also pick up a good book and read.
|
|
|
|
|
|
|
Try DotnetFunda, Questpond. The second one requires a payment for their training and dvd's. But the amount is very nominal and worth it.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
You can for example enter the length and width of the web (VS.NET2005), when it runs out of range index error exception was unhandled by user code for chieudai
public class Tinh
{
private Int32 _quanhuyen;
private String _diachiNha;
private Double _chieudai;
private Double _chieurong;
private Double _dientichDat;
}
public Int32 Quanhuyen
{
get { return _quanhuyen; }
set { _quanhuyen = value; }
}
public String DiachiNha
{
get { return _diachiNha; }
set { _diachiNha = value; }
}
public Double Chieudai
{
get { return _chieudai; }
set { _chieudai = value; }
}
public Double Chieurong
{
get { return _chieurong; }
set { _chieurong = value; }
}
public Double DientichDat
{
get { return _dientichDat; }
set { _dientichDat = value; }
}
private Tinh DienTich(IDataReader dr, bool GetTotalRecords)
{
Tinh obj = new Tinh();
...
obj.Quanhuyen = (dr["Quanhuyen"] is DBNull) ? Int32.MinValue : (Int32)dr["Quanhuyen"];
obj.DiachiNha = (dr["DiachiNha"] is DBNull) ? String.Empty : (String)dr["DiachiNha"];
// bottom line this error index out of range exception was unhandled by user code
obj.Chieudai = (dr["Chieudai"] is DBNull) ? Double.MinValue : (Double)dr["Chieudai"];
obj.Chieurong = (dr["Chieurong"] is DBNull) ? Double.MinValue : (Double)dr["Chieurong"];
obj.DientichDat = (dr["DientichDat"] is DBNull) ? Double.MinValue : (Double)dr["DientichDat"];
if (GetTotalRecords)
obj.TotalRecords = (dr["TotalRecords"] is DBNull) ? -1 : Globals.ConvertToInt32(dr["TotalRecords"]);
return obj;
}
error index out of range exception was unhandled by user code
modified 11-Jul-12 3:04am.
|
|
|
|
|
On which line you are getting this error ?
|
|
|
|
|
Your coding skills look pretty advanced, I don't see why you can't figure it out yourself.
Why is chieudai a double and not a Int32?, you would think all the obj have the same value, since it's a list of people. I don't understand chieudai, is it a lemon, lime, orange, or cherry.
Did you assign the property chieudai a default value, if the property is not set in the web form.
|
|
|
|
|
I fixed all right, thank you for comments
|
|
|
|
|
hi i have a doubt about expire validation of user i make some thing. i am not sure about this .
Below code the all loop are not working.
String edate = session["edate"].ToString();
String today = DateTime.Now.ToString("d");
int result = edate.CompareTo(today);
if (result == 0)
{
Response.Write( "your account expire on today ");
}
else if (result < 0)
{
Response.Write("your account exipired ");
}
else
{
Response.Write("your account expire on next week ");
}
can anyone help
thanks
|
|
|
|