|
I don't think I understand your question. you seem to me to be asking how to update some text on a click event. How is that hard ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hey,
have a look HERE[^]..
Hope you require this only...
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
hiiii to alll
what coding that wanted to go one website to other website in asp.net
please provide me
rizvan sivally
|
|
|
|
|
sheemap wrote: what coding that wanted to go one website to other website in asp.net
please provide me
Response.Redirect("www.google.com");
When you fail to plan, you are planning to fail.
|
|
|
|
|
nice coincidence, both of us used google.com
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Yeah.
just to mention a small typo in ur reply....
Repsonse.Redirect
its Response.Redirect. Well thats ok.
When you fail to plan, you are planning to fail.
|
|
|
|
|
Read this[^].
this would help you understand tha navigation.
Otherwise,
Repsonse.Redirect("www.google.com");
is an answer.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
thanks
but i wanted to know that open in New window not same window
rizvan sivally
|
|
|
|
|
this [^]should help
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
You probably should have said that, then. You should consider buying a book on ASP.NET instead of just relying on these forums. It will help you in the long run
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi all,
I am using asp.net 2.0 with C# and SQL Server 2005. I would like to use custom paging in my web application.I have study the row_number() function, but how could i implement it in my code? If i use custom paging, how to display the footer pager's number?
any helps and tips are welcome.
thanks in advance
regards
cocoonwls
|
|
|
|
|
|
<big>i am using sqlserver2000 when i updating datetime the following error occured</big>
<big><pre>"String or binary data would be truncated.\The statement has been terminated."</pre></big>
|
|
|
|
|
First of all this is no ASP.Net question. It should be in SQL Server forum.
In between, did you even try to look for this error message on Google[^]?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
May be your input string exceed the length.
For example - any one of the field name "EmpName" - varchar(10) - for this you will input more than the specified length.
Regards,
Karthik K...
|
|
|
|
|
sivasampathkumar wrote: Subject: please helpme
Subject should not be like that. You should give proper subject line that every can understand that what is type of problem you have from the subject itself.
sivasampathkumar wrote: i am using sqlserver2000 when i updating datetime the following error occured
"String or binary data would be truncated.\The statement has been terminated."
Post Formatting : We know CP Forum having a nice editor. But Use it properly.
|
|
|
|
|
Dude, check your string/DateTime format you inserting. The DateTime field in SQL 2000 does not have a length validator, but it might be expecting just the date. So from what i know is that one should always check to see if the DateTime input is being formatted correctly, this is because some asp.net dateTime members may be inserting a default time of 12:00 after the date itself. Also make sure that the field you are updating on SQL side is actually a Date field. Hope i helped you mate. Good luck. Gimmmme some cheese 
|
|
|
|
|
I have a fileupload control and a Regular expression validation control in my page. The requirement is user can upload only a word or pdf file, which is working fine. There is also a upload button, which when finishes with upload gives the message that 'Document Uploaded successfully'. This also working fine.
My issue is, if the user again clicks on browse button (after uploaded the file successfully) in FileUpload Control and checks any file other than doc or pdf file, both the messages are displaying:"Only doc or PDF file should be uploaded" and "Document uploaded successfully". This looks weird.
Any idea how to overcome this? I tried to write servevalidate events but it's not firing at all. Anybody provides any idea on this? Thanks for the help.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
My guess is you do not return from the function if the validation fails.
But it would be nice, if you can post your code so that exact problem can be looked upon.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Here is the code:
<tr><td><asp:FileUpload ID="DocumentFileUpload" runat="server" />
<asp:Button ID="DocumentUploadButton" runat="server" OnClick="DocumentUploadButton_Click"
Text="Upload" Height="21px" Width="80px" /></td>
</tr>
<tr><td><asp:CustomValidator ID="DocumentUploadedCustomValidator" runat="server" Display="Dynamic" CssClass="labeltext"
ErrorMessage="<"Document must be uploaded %>"
OnServerValidate="DocumentUploadedCustomValidator_ServerValidate" ></asp:CustomValidator>
<asp:RegularExpressionValidator ID="DocumentUploadExpressionValidator" runat="server" CssClass="labeltext"
ControlToValidate="DocumentFileUpload" Display="Dynamic"
ErrorMessage="<"Only PDF or Word files is allowed."%>"
ValidationExpression="[a-zA-Z\\].*(.doc|.DOC|.docx|.DOCX|.pdf|.PDF)$"></asp:RegularExpressionValidator>
</td>
</tr>
protected void DocumentUploadedCustomValidator_ServerValidate(object source, ServerValidateEventArgs args)
{
CustomValidator cv = (CustomValidator)source;
args.IsValid = !String.IsNullOrEmpty(System.Convert.ToString(ViewState["DocumentFileId"]));
}
protected void DocumentUploadButton_Click(object sender, EventArgs e)
{
PDFFilename = Path.GetFileName(DocumentFileUpload.PostedFile.FileName);
int FileExtensionIndex = PDFFilename.IndexOf(".");
PDFFilename = PDFFilename.Substring(0, FileExtensionIndex);
PDFFilename += ".pdf";
ViewState["PDFFilename"] = PDFFilename;
Guid g = AddFile(DocumentFileUpload.FileBytes, PDFFilename);
File.Delete(PDFSaveLocation);
ViewState["DocumentFileId"] = g;
DocumentUploadedCustomValidator.IsValid = true;
if (ViewState["DocumentFileId"] != null)
{
DocumentUploadedLabel.CssClass = "SuccessMessagesLabel";
DocumentUploadedLabel.Text = "Document Uploaded Successfully";
}
else
{
DocumentUploadedLabel.CssClass = "ErrorMessagesLabel";
DocumentUploadedLabel.Text = "Document Upload Failed";
}}
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Hey man... are you using windows apps (OpenFileDialoge) or web app HTML File input? 
|
|
|
|
|
Hi ,
i want to specify the maximum number of digits for numeric part and the Decimal part in a text box.
i tried specifying precision and maxlength of the text box but then it if we input the max length then the precesion cannot be inputted and it gets resetted to the maxamount which should not be possible.
like if Maxlength=8
precsion = 2
input required:123456.90 possible
input required : 12345678.89 which is not possible
so is there any way we could specify the format of the numeric part and as well the decimal part. which would restrict for only that particular input format.
like : dddddddd.dd
thanks in advance....
cheers,
sriharsha
|
|
|
|
|
You can use regular expressions to do the validation.
In between, do you how to build a regular expression for this?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
hi,
but what is the validation expression we need to give for it.
i tried giving
<asp:regularexpressionvalidator id="regexpName"
runat="server"
errormessage="This expression does notvalidate." controltovalidate="TextBox5" validationexpression="^\d\d\d\d.\d\d$">;
but does not work properly.
Thanks and Regards,
sriharsha
|
|
|
|
|
Hi,
you want the same ?
string strD= 1000.1234;<br />
int dI =strD.indexof(".");<br />
string DecimalVal=strD.substring(dI,dI+1);<br />
<br />
string strVal=strD.substring(0,dI);
Hope it will help you..
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|