|
Phumlani Kunene wrote: How to add database name, server name, username, password to the connection string configuration file when you compiling the website.
This one[^] tells you every thing about Connections Strings
Phumlani Kunene wrote: And How to convert from object of class where you add parameter to the list.
What to you want to convert?
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.
|
|
|
|
|
In my application i want to attach a file of (.xls) type.which is created from a grid view.how to achieve it.
|
|
|
|
|
Not sure how this is ASP.NET related, but, how are you sending email, that this isn't easy ? I just add to the Attachments collection on the mail class.
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,
if you are having any file.
You can use This[^] links to get your answer..
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
suppose i have a gridview and it contain 3 column first column contain userid,second column contain linkbutton and third column contain text locked but it is not visible.and now i want update user information of locked on clicking linkbutton.
how is it possible?
please help me.
|
|
|
|
|
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.
|
|
|
|