|
problem: I use 1 table book on SQL Server 2005
table book of school:
1. idBook
2.idPublish
3.idAuthor
4.tittle
5.introduction
6.price
table in the book include books have tittle as follows:
1. Văn học việt nam cận đại
2. Tự học tiếng anh
3. tự học lập trình SQL 2005
4. Văn học nước ngoài
5. phát triển website với .net 2005
requirements:
They built storeduce 1 to load data from sql on dataset
storeduce structure as follows:
...
@txtSearch nvarchar (200)
Begin
Select ...
from book
where ...
end
...
I want:
@txtSearch='Văn học cận đại'-->2 record:Văn học việt nam cận đại, Văn học nước ngoài
@txtSearch='lập trình SQl 2005'-->2 record:tự học lập trình SQL 2005,phát triển website với .net 2005
Thanks you!
|
|
|
|
|
May i ask what is "storeduce"?
Btw, are you searching for "LIKE"?
SELECT idBook FROM Book WHERE title LIKE N'%van hoc%'
|
|
|
|
|
I can't even make out what you're trying to ask
only two letters away from being an asset
|
|
|
|
|
In which language Stored Procedure is called storeduce???
Anyways, Lemme give it a try.
SELECT * FROM book WHERE title like @txtSearch
This is the most I(or probably anyone in this world) can do for you.
Buddy, You really need to ask your question properly.
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.
|
|
|
|
|
I want to make a guestbook for users visiting my site.
I have some textboxes wherein user enters his name, email address, & a message. At the bottom there is a button called "post". As soon as a user fills up the textboxes & clicks post buuton. I want the message to be shown on my page along with their details.
Does anybody have an idea how to do this? Or How can I send a mail filled with form item details.
|
|
|
|
|
Posting user supplied data to a webform? Gee, I don't know, sounds rather difficult
Get an ASP.NET book, drop it on the floor and look at the page that is open. I bet you'll find the answer.
only two letters away from being an asset
|
|
|
|
|
i am a 100 pc network adminstrator. i want to safe soem paper and tone so i was thinking to implement a solution to that; force print preview option before printing on all types of documents. i saw posted the "PrintPreview_scr" code but i don't know how to adopt it to my domain users.
thanks a lot for any reply
|
|
|
|
|
This is the asp.net forum. I think you meant to post this elsewhere.
I didn't get any requirements for the signature
|
|
|
|
|
marjanaprifti wrote: am a 100 pc network adminstrator. i want to safe soem paper and tone so i was thinking to implement a solution to that; force print preview option before printing on all types of documents. i saw posted the "PrintPreview_scr" code but i don't know how to adopt it to my domain users.
How does it related to ASP.NET ?
|
|
|
|
|
Hi all,
Is it possible to get access to a query string when its hidden from view? Google's query string would be easy to do as you can capture the value of 'q' from the string, change it then set it away searching as its visible.
It doesn't matter to the application that the user can't see (or does not need to see) the query string but how can I capture it, manipulate it behind the scenes than pass it to be processed?
Cheers
Scott
|
|
|
|
|
You can use hidden variables.
You can also use context variable with Server.Transfer method for moving one page to another.
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 for that, didn't know you could do that.
Will that also grant access to the query string as well? Will need to see it to extract the parameter names from the query string?
|
|
|
|
|
Hello
can we hide any column into grid view where we can store any id of particular item which can be use for further operation
plz any one guide me
if any body has its samples solution plz give ge
|
|
|
|
|
instead of storing it in any column and hiding it you can use datakeys.....
sample code:
//in RowEditing event
int row = e.NewEditIndex;
string id = GridView1.DataKeys[row][0].ToString();
|
|
|
|
|
If I understand your question correctly, wouldn't setting the columns Visible property to false provide you with the solution you seek (Visible="false" ). This is a very common technique.
Regards,
Gary
|
|
|
|
|
Hi...
here i have send mail with attachment file.
i have used stream class for sending attachment.
Here is code......
public bool SendMailToExternalUser(string strToEmail, string strbody, string strSubject, string strFileName, Stream FileStream,bool bCheck)
{
bResult = false;
MailAddress from = new MailAddress(Config.MailFrom);
MailAddress to = new MailAddress(strToEmail);
MailMessage mail = new MailMessage(from, to);
mail.Subject = strSubject;
mail.Body = strbody;
mail.IsBodyHtml = true;
mail.Sender = from;
Attachment attachFile = new Attachment(FileStream, strFileName);
mail.Attachments.Add(attachFile);
if (bCheck == true)
{
SmtpClient SmtpMail = new SmtpClient(Config.MailServerSmtp);
SmtpMail.Send(mail);
bResult = true;
}
bResult = true;
}
this works fine when there is only one file to attach.
but if i want to attach multiple files then it overwrite to first file with second.
how can i get more then one file in FileStream?
kindly help to solvethis issue.
Thanks.
Regards,
PUJA FALDU
|
|
|
|
|
pujafaldu wrote: but if i want to attach multiple files then it overwrite to first file with second.
How are you attaching multple files?
The code only seems to work as far as there is one attachment.
In fact your method should look like:
public bool SendMailToExternalUser(string strToEmail, string strbody, string strSubject, List<string> PlstFileNames, List<Stream> PlstStreams)
{
MailAddress from = new MailAddress(Config.MailFrom);
MailAddress to = new MailAddress(strToEmail);
MailMessage mail = new MailMessage(from, to);
mail.Subject = strSubject;
mail.Body = strbody;
mail.IsBodyHtml = true;
mail.Sender = from;
for(int LiCount = 0; LiCount < PlstFileNames.Count; LiCount++)
{
Attachment attachFile = new Attachment(PlstStreams[LiCount], PlstFileNames[LiCount]);
mail.Attachments.Add(attachFile);
}
SmtpClient SmtpMail = new SmtpClient(Config.MailServerSmtp);
SmtpMail.Send(mail);
}
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.
|
|
|
|
|
my question is here!
List<stream> PlstStreams , how can i create group of stream for multiple files.
i have code for stream in another file which pass above values.
string strAttach = string.Empty;
string strSendAttach = string.Empty;
string strFileName = string.Empty;
string strFileAttachment = string.Empty;
Stream FileStream;
bool bFlag = false;
bool bCheck = false;
HttpFileCollection hfc = Request.Files;
if (hfc.Count != 0)
{
for (int i = 0; i < hfc.Count; i++)
{
if (!string.IsNullOrEmpty(hfc[i].FileName))
{
FileStream = hfc[i].InputStream;
strFileAttachment = hfc[i].FileName;
if (objMailSend.SendMailToExternalUser(ValidetEmailId, txtMailBody.Text, lblSubject.Text, strFileAttachment, FileStream, bCheck))
{
lblMessage.Visible = true;
lblMessage.Text = "Mail has been sent successfully.";
lblMessage.CssClass = "succLabel";
}
}
}
}
Thanks.
Regards,
PUJA FALDU
|
|
|
|
|
May be you can do this:
string strAttach = string.Empty;
string strSendAttach = string.Empty;
string strFileName = string.Empty;
string strFileAttachment = string.Empty;
Stream FileStream;
bool bFlag = false;
bool bCheck = false;
HttpFileCollection hfc = Request.Files;
objMailSend.SendMailToExternalUser(ValidetEmailId, txtMailBody.Text, lblSubject.Text, hfc);
public void SendMailToExternalUser(string strToEmail, string strbody, string strSubject, HttpFileCollection PobjFileCollection)
{
MailAddress from = new MailAddress(Config.MailFrom);
MailAddress to = new MailAddress(strToEmail);
MailMessage mail = new MailMessage(from, to);
mail.Subject = strSubject;
mail.Body = strbody;
mail.IsBodyHtml = true;
mail.Sender = from;
for(int LiCount = 0; LiCount < PobjFileCollection.Count; LiCount++)
{
Attachment attachFile = new Attachment(PobjFileCollection[LiCount].InputStream, PobjFileCollection[LiCount].FileName);
mail.Attachments.Add(attachFile);
}
SmtpClient SmtpMail = new SmtpClient(Config.MailServerSmtp);
SmtpMail.Send(mail);
}
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.
|
|
|
|
|
Hey....
Lots of Thanks..........................
as ur suggestion ,i have made changes and it works fine..
Regards,
PUJA FALDU
|
|
|
|
|
I realize this doesn't answer your code-specific question, but is zipping the files an option? It will provide better speed and reliably, and limit your attachments to a single file. You can use the System.IO.Compression class to compress the stream of files. Advantages of zipping files for email: Zip or unzip a file[^]
Regards,
Gary
|
|
|
|
|
Hi I am a c++ programmer new to ASP.NET, I am using VS 2005
I want to create a Web Form with 2 or 3 fields with save button, which can insert a
record in the ORACLE table.
Please advice good links or resource
|
|
|
|
|
Have a look here[^] for straight solution.
For more learning, this [^]would be nice.
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.
|
|
|
|
|
There are lots of samples available when you google....
|
|
|
|
|