|
Hi!! I'm using a dropdownlist to display some(DataTextField) text and some numbers (DataValueField) are set as their corresponding values.These numbers are stored in database.If I want to select the text in dropdownlist on the basis of no fetched from the database. How to do it? Any help is appreciated
Thanks.
Nitin vij
|
|
|
|
|
Hi,
Can you please give a bit more detail about the problem. Do you want to select the value on the basis of DataValue field or the index of the dropdownlist.
Best Regards,
Apurva Kaushal
|
|
|
|
|
hi Nitin,
You can use DropDownList1.Items.FindByValue(ID).Selected=true
Hope this will solve your problem.
Best Regards,
Apurva Kaushal
|
|
|
|
|
hai this is ajay.
i have a datagrid.i want to give a heading to this datagrid.is ther any attribute of datagrid which can achieve it.i have used a panel just above the grid which acts as a heading for the grid but its size is rigid,it should be in accordance with the size of grid,so that it comes in the center and look like a heading.
plz resolve my problem.
|
|
|
|
|
hi ajay
this is nikesh.you can use html table of 2*1.Put ur datadrid in 2nd row and
right ur heading in first row and set the 2 property of that table .
first one align=center second one valign=center.
i think it will work fine
Nikesh Sahu
nikesh
|
|
|
|
|
Of right click on the datagrid, go to property builder and set the header text for the columns...;P
|
|
|
|
|
Hi,
How to create 3- D Chart in asp.net.
rajesh
|
|
|
|
|
|
I guess you are able to execute a select command to check if the record exists or not before inserting it into DB. If you don't know how to write it, you can get started with the starter kits[^] and tutorials[^]
|
|
|
|
|
hi all,
im using an datalist in my application,everything is going fine ,but when i click the edit button to edit an record im getting an error like assembly not found.im using this code for the edit command of the datalist.
DataList1.EditItemIndex=e.Item.ItemIndex;
<pre>
with regards,
susa
|
|
|
|
|
Hi there. Your sample code seems not to do with the error you are currently seeing. You might also want to post the error message.
|
|
|
|
|
hi there ,
im getting an error like 'the assembly is not found' .this is am getting .
with regards,
susa
|
|
|
|
|
hi susa ,
this is nikesh .i think you have to set command name property of button commandName="edit" in aspx page. if you will send custom error message it can be clear where the exactly problem.
Nikesh Sahu
nikesh
|
|
|
|
|
Hi all
I am using asp.net 1.0
I have an application
The client have to download folders from FTP server (using vb)
I want ZIP them by programmatically
Is it posible In my asp.net version (1.0) to ZIP a folder/file
Please can any one help me
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
-- modified at 0:49 Friday 12th May, 2006
|
|
|
|
|
You might want to check out the SharpZipLib[^].
kirthikirthi wrote: I am using asp.net 1.0
I'm curious that why you don't choose the version 2.0, or it's just that your requirement
|
|
|
|
|
Hi,
Is there Any way to Update(Overwrite)/Delete previously Uploaded File. I am Using, <asp:fileupload> Control. Even If there is any way to achieve this with out using fileUpload Control, Please Suggest that. Can I restrict user to perticular directory and not allowing him to look out side of that Directory??
Please Help!!
Thank you
|
|
|
|
|
Hi,
I didnt get your requirement correctly.like its up to you where you want to save perticular file on sever.
see this article i think it will help for u.
http://www.codeproject.com/aspnet/fileupload.asp
Nikesh
nikesh
|
|
|
|
|
hi to all,
I am haviang a problem in webpage printing. My web page is containing a multiline text box.
If the values in that multiline text box more than one page, it is displaying correctly. But If I send it to printer, only the first page is printing and other pages are ignored. I checked in print preview. There are also displaying only one page. how to print the total pages instead of one page....
Thanks,
Bhasker P
-- modified at 17:59 Thursday 11th May, 2006
|
|
|
|
|
hi,
I had a c# windows application that connects to IBM DB2 using OleDb, and it works just fine. However, the same piece of code doesn't work in a c# web application and following is the error I got
"The 'IBMDADB2.1' provider is not registered on the local machine"
following is my code
System.Data.OleDb.OleDbCommand oCmd;
System.Data.Odbc.OdbcCommand oODBCCmd;
String sConnString="";
try
{
sConnString="Provider=IBMDADB2.1;Password=MYPASSWORD;Persist Security Info=True;User ID=db2admin;DSN=MYDSN;Location='';Extended Properties=''";
oCmd = new System.Data.OleDb.OleDbCommand();
oCmd.Connection = new System.Data.OleDb.OleDbConnection(sConnString);
oCmd.Connection.Open();
}
catch(Exception err){
String strErrorMsg = err.Message;
}
Please help!!! I did google the error but coudln't resolve the issue.
Thank you very much!!!!!!!!!
|
|
|
|
|
|
Hi, I read a tutorial about sending email from ASP.NET application using SMTP server .... I wrote the following;
SmtpMail.SmtpServer.Insert(0,"127.0.0.1");
SmtpMail.Send(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text);
In the text boxes i am providing appropriate values while when I execute this code, I receive the following error:
Server Error in '/EmailTestHere' Application.
--------------------------------------------------------------------------------
The "SendUsing" configuration value is invalid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: The "SendUsing" configuration value is invalid.
Source Error:
Line 56: SmtpMail.SmtpServer.Insert(0,"127.0.0.1");
Line 57:
Line 58: SmtpMail.Send(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text);
Line 59: }
Line 60: }
Source File: c:\inetpub\wwwroot\emailtesthere\webform1.aspx.cs Line: 58
Stack Trace:
[COMException (0x80040220): The "SendUsing" configuration value is invalid.
]
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) +473
System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) +58
[HttpException (0x80004005): Could not access 'CDO.Message' object.]
System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) +112
System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1846
System.Web.Mail.CdoSysHelper.Send(String from, String to, String subject, String messageText) +74
System.Web.Mail.SmtpMail.Send(String from, String to, String subject, String messageText) +171
EmailTestHere.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\emailtesthere\webform1.aspx.cs:58
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
|
|
|
|
|
hi
can you provide your total code??
thanks,
Bhasker P
|
|
|
|
|
Hi, well thanx for your concern but that was my total code except the header files .... and I got it right using the following;
SmtpMail.SmtpServer = "localhost";
It is not working by using "127.0.0.1" for some reason!
Thanx a lot!
|
|
|
|
|
setting the smtpserver to localhost or 127.0.0.1 wont work for this.
you must have a configured SMTP server in your sysstem.
for us the SMTP server is "hlssrvdcmer008"
below is code for sending mail. check it.
System.Web.Mail.MailMessage msg = new System.Web.Mail.MailMessage();<br />
msg.Subject=Sub;<br />
msg.BodyFormat=System.Web.Mail.MailFormat.Text;<br />
msg.Body=bodyText;<br />
msg.To=mailTo;<br />
msg.From=mailFrom<br />
System.Web.Mail.SmtpMail.SmtpServer= "hlssrvdcmer008"<br />
System.Web.Mail.SmtpMail.Send(msg);
where variables Sub,bodyText, mailTo and mailFrom should be set with apprpriate values.
first of all find out your SMTP server name(if any);
hope this helps you
cheers
Ramesh.Kanjinghat
|
|
|
|
|
Hi,
I am using File Upload Control, and i want to place the file in APP_Code folder.
I have made the solution in InetPub-> WWWRoot.
But when i try to upload the file it gives a security error.
What i want is that anyone who wants to upload the file in this folder can upload the file regardless of the Rights he have.
I am using WIn 2k and iis5.
Thanks in Adv.
Deepak Surana
|
|
|
|