|
ahmad25 wrote: I fetch only one value from a column. if I want to fetch a entire row what can I do?
ExecuteScalar can return only a single column. Use ExecuteReader instead. Take it to a SqlDataReader instance.
|
|
|
|
|
Hi,
If in login table you told that value is like table1,table2 etc. After retriving data from that column you directly inserted in insert query I don't think so you can insert data more that one table at a time. As per your code you are trying to write this query
insert into table1,table2 values ('1','1');
It will generate error. Am I right?
Other wise after retriving that data split it with , then loop and fire insert query.
Just reply am I write with above query. And also describe the error message perfactly.
http://techiefromsurat.blogspot.com
|
|
|
|
|
Hi!
Thanks for your reply. but i think you do not understand my question.
it is right that we can't insert data at a time more than one table.
Mr. Navneeth give me a right query.
Thanx
|
|
|
|
|
how to create more than one excel sheet on button click in asp.net and C#?
|
|
|
|
|
vikas2727 wrote: how to create more than one excel sheet on button click in asp.net and C#?
Probably in a loop
|
|
|
|
|
hi all, I am learning to send an email frm my website using system.net.mail. The mail is sent and there is no error but the recipient doesn't recieve the mail but it is shown in Inetpub\mailroot\queue and after sometime delivery is failed.
Plz help me.Where I am wrong ?? Any specific setting for this??
//variables
string strFromEmail = tbxFrom.Text;
string strToEmail = tbxTo.Text;
string strSubject = tbxSubject.Text;
string strMsg = ftbMsg.Text;
string strHostName = "mail.gmail.com";
int iHostSMTPPort=25;
//string strImagePath;
//variable to create message instace
MailAddress mailAddrFrom = new MailAddress(strFromEmail);
MailAddress mailAddrTo = new MailAddress(strToEmail);
MailMessage msgObj = new MailMessage(mailAddrFrom,mailAddrTo);
//definitions to send mail
SmtpClient smtpObj = new SmtpClient(strHostName, iHostSMTPPort);
//settings to send email
msgObj.Subject = strSubject;
msgObj.Body = strMsg;
msgObj.IsBodyHtml = true;
smtpObj.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
//sending email
smtpObj.Send(msgObj);
|
|
|
|
|
Does your SMTP server Configure properly?
|
|
|
|
|
I don't know. It works fine when I send email from my gmail account.but fails when I use any other domaim.I use server smtp.gmail.com
Thanks for ur response.
|
|
|
|
|
You can not use smtp.gmail.com you have to use mail.yourdomainname.com. and if you are sending from local system then use localhost or 127.0.0.1
I hope it will help you.
http://techiefromsurat.blogspot.com
|
|
|
|
|
joindotnet wrote: Inetpub\mailroot\queue
Your SMTP server might be stopped. Type inetmgr in the "Run" window, Click on "Default SMTP server" and start it.
|
|
|
|
|
It is not stopped.I have checked it.I can send emails from gmail to gmail if I use smtp.gmail.com host server.
How can I send mail from any domain to any domain.
Plz help.I'd be obliged.
|
|
|
|
|
i see many people had posted this problem. can some one please help.
i have a user control with asp:label on it. the label loses its text on postback
it is now a whole month i am trying to find a work around but no success.
|
|
|
|
|
hassanmohamed wrote: i see many people had posted this problem.
Did they get any answers?
hassanmohamed wrote: it is now a whole month i am trying to find a work around but no success.
That's sad, man.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Are you re-binding the control every time you postback? Where are you setting the text? Can you post a few (smallish) code snippets.
|
|
|
|
|
Looks like you are adding label dynamically. ASP.NET won't maintain viewstate for dynamic controls created after viewstate is loaded.
|
|
|
|
|
Check your label for following scenarios :
1. Is the property EnableViewState is set to false for the label control or its parent control
2. Is the control is being dynamically added to your page. if yes recreate the control on "Init"
3. Binding a "Null" or "Empty" value to label on postbacks
|
|
|
|
|
(I asked this question in C# sub-forum, but according to the discussion with others, I post the question here. Thanks for understanding.)
Hello everyone,
If my ASP.Net page returns both response Http headers and redirection to client's Http request, my question is when client follows the redirection instruction to access the redirection destination URL, will the client automatically include the response Http headers into the further Http request headers to follow-up redirection or not? Is it a standard to follow to include the previous Http response headers to redirection Http request headers by client or optional?
(my current confusion is I want client to redirect to some other URL and also include current Http response headers to the redirection URL request headers, but I am not sure whether all clients could follow this way.)
BTW: clients I mean browsers.
thanks in advance,
George
|
|
|
|
|
cant get ur question.
Thanks
(with regards)
B.Balachandhar
|
|
|
|
|
Thanks Balachandhar,
My question is like this,
1. browser send http request to server, server response with redirection to another URL and also include some response http headers;
2. browser will then follow the redirection URL to send http request.
my question is in step 2, will the browser send the response http headers (received in step 1) as http request header to the redirection URL? Is it a must or not ensured all kinds of browsers will follow up to send the response http headers (received in step 1) as http request header to the redirection URL?
regards,
George
|
|
|
|
|
Hi, thanks for looking
I started my site with tables layout (with a css file for most of the properties), then changed to divs (also using a css file for the properties)
They look the same
The problem is that when using a slow connection, now that im using divs, sometimes the page renders, but it renders the divs one below the other (which looks horrible)
I think that the browser doesnt read the css file so it has no idea of how the layout is supposed to be
Are there any workarounds other that adding all the css inside the page (MasterPage)??
Thanks in advance for any help and comments
Alexei Rodriguez
|
|
|
|
|
Sounds like your issue is with the code that includes the css file, or are you saying it reads the css file last and thus doesn't look right until it finishes loading ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks for the reply
The css is right, the page usually appears right, the css file is in a separate file and links from the head section of the page
The problem is (i think) that when the user has a slow connection, the browser doesnt download the css file or downloads it until the end when the page is already shown, and the divs appear one below the other and are never rearranged
But there is no pproblem with the css, otherwise, the age would look bad always
Thanks again
Alexei Rodriguez
|
|
|
|
|
AlexeiXX3 wrote: The problem is (i think) that when the user has a slow connection, the browser doesnt download the css file
Is your CSS so big? Check this[^] and this[^] articles. It is worth reading.
|
|
|
|
|
No, the css is only 2K
I included the css that defines the main structure inside the page, and the rest in the css external file
Alexei Rodriguez
|
|
|
|
|
hello
Please check the sample excel sheet I intend to use to get a clear understanding of my question
I need to use datareader to query using a sql statement to retrieve data from the woksheet. I know how to read from excel using ado.net if the column names are on Row 1. However, in the excel file i need to use it starts in Row 4. So, how do i write a query to read from the table and retrieve the values?
Sample excel sheet
http://img412.imageshack.us/img412/1950/sampleworsheetta6.jpg[^]
|
|
|
|