|
It is by design. If you want to override you can avoid caching of the image thus incurring a performance overhead.
You can observe this syndrome in your CodeProject members page also.
|
|
|
|
|
Thanks Vasudevan,
How to avoid caching of the image, can you give code please..
Raj D
|
|
|
|
|
how to give DBO permissions to ASPNET_ tables that are created when I used the Login control supplied in visual studio. I created the tables on the SQL Server and pointing my login controls to those tables. But I get an error about DBO rights
please help
Raj D
|
|
|
|
|
hi
could anybody pls help how to write serial communication code in asp.net(asp) web application.
thanks in advance
|
|
|
|
|
|
Yes..but i'm not very sure with the code and..actually i can not find the control for serial port in visual web developer as MSComm control in visual basic 6
|
|
|
|
|
The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The possible cause is that a context was Set on the thread and not reverted(undone).
this error is comeing in my application plz help
|
|
|
|
|
How to call up current page using response.redirect or server.transfer? how to get current page into a variable to use with server.transfer?
Appreciate input
Raj D
|
|
|
|
|
If you want to call the current page then better use the following.
server.transfer(Request.CurrentExecutionFilePath);
Koushik
|
|
|
|
|
Hi,
I am studying this book "Microsoft Visual C# 2005 Step by Step (by John Sharp)". I used a piece of code written in the book and I get an error message. Could you please help me fix it?
==========================================
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Configuration;
using System.Data.SqlClient;
using System.Diagnostics;
[WebService(Namespace = " http://www.contentmaster.com/WebSite3")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string HelloWorld() {
return "Hello World";
}
[WebMethod]
public decimal Howmuch(string name,int q)
{
SqlConnection sqlcon = null;
try
{
ConnectionStringSettings cs = ConfigurationManager.ConnectionStrings ["productconnstring"];
string connnstring = cs.ConnectionString;
sqlcon = new SqlConnection(connnstring);
SqlCommand sqlcomd = new SqlCommand();
sqlcomd.CommandText = "SELECT StandardCost FROM Production.Product" + "WHERE Name= '" + name + "'";
sqlcomd.Connection = sqlcon;
sqlcon.Open();
decimal price = (decimal)sqlcomd.ExecuteScalar();
return (price * q);
}
catch (Exception ex)
{
Handlewebexception(ex);
}
finally
{
if (sqlcon != null)
sqlcon.Close();
}
}
//Local private method to handle exceptions
private void Handlewebexception(Exception e)
{
EventLog log = new EventLog("Application");
log.Source = "website3";
log.WriteEntry(e.Message, EventLogEntryType.Error);
}
}
=======================================================
I use:
--- Windows XP Professional SP2
--- Visual Studio 2005
--- Microsoft SQL Server 2005
--- AdventureWorks Database
Error Message when I do "Build Website" - "Error 1 'Service.Howmuch(string, int)': not all code paths return a value C:\Documents and Settings\Srivathsan\My Documents\Visual Studio 2005\WebSites\WebSite3\App_Code\Service.cs 26 18 C:\...\WebSite3\ "
Please let me know how to fix it. I believe there is something wrong with return statements (absence of it somewhere). I am unable to figure out.
I would appreciate any suggestions,
Harni.
|
|
|
|
|
Hi,
howmuch function must retuen decimal value, you put return statment in try clause only, but you must put i also in finally clause in case any exception found
finally
{
if (sqlcon != null)
sqlcon.Close();
return 0;
}
I hope it work
|
|
|
|
|
harni.a wrote: catch (Exception ex)
{
Handlewebexception(ex);
}
What does this return?
|
|
|
|
|
private void handleWebException(Exception e)
{
EventLog log = new EventLog("Application");
log.Source = "WebSite3";
log.WriteEntry(e.Message, EventLogEntryType.Error);
}
Actually,this method displays the error description in a windows application event log.
Regards,
Harni Srivathsan.
|
|
|
|
|
Hi, I've made a very simple web service with a wizard. It was ok when I worked on it last week, but now I'm trying to add new methods but when I compile it all, it says that the Methods I'm calling do not exist. I have even erased the default HelloWorld method and it is still shown by the intellisense widget.
I've verified the Build > Configuration Manager and my service is really compiled. Has anyone any idea what's going on?
Thanks a lot!
|
|
|
|
|
Do you update the service reference at the client side?
|
|
|
|
|
|
Hey guys, I'm trying to create html links of all URL's in a string. I'm calling the function below which seems to be pretty close to my needs, except for when someone enters a link followed by text directly after the url. Somebody with a 'proven technology' solution?
<br />
public static string LinkText(string Input)<br />
{<br />
Regex urlregex = new Regex(@"(http:\/\/([\w.]+\/?)\S*)", RegexOptions.IgnoreCase | RegexOptions.Compiled);<br />
string Output = urlregex.Replace(Input, "<a href=\"$1\" target=\"_blank\">$1</a>");<br />
Regex emailregex = new Regex(@"([a-zA-Z_0-9.-]+\@[a-zA-Z_0-9.-]+\.\w+)", RegexOptions.IgnoreCase | RegexOptions.Compiled);<br />
Output = emailregex.Replace(Output, "<a href=mailto:$1>$1</a>");<br />
return Output;<br />
}<br />
|
|
|
|
|
|
Hi all,
i want to know how to store image in SQL database from asp.net page then retrieve and display it in another page.
please answer me as soon
|
|
|
|
|
I would not recommend storing images in your database because of performance issues. Store the URL of the image instead and store the image itself just as a file somewhere on your webserver.
|
|
|
|
|
|
Thanks for your reply, this article toke about Windows Application and i need Web page, i think it differ, so if you know any thing please tell me
|
|
|
|
|
Saving image into database is not a good idea.I recommend u to save image ina specific folder and save its file name in the Database.
if u want to save this file in database first u convert it to byte arrya nad save it.
In the database(MSSQL 2005) the datatype of that filed is varbinary(MAX).
I hope you are using asp:FileUpload control for uploading the file.It have a proeprty named FileBytes, we can convert this file into binary
byte[] FileData;
FileData=FileUpload1.FileBytes;
and u can inert this binary arry to DB
I hope this ll help u
All I ever wanted is what others have....
CrazySanker
|
|
|
|
|
Saving image into database is not a good idea.I recommend u to save image ina specific folder and save its file name in the Database.
if u want to save this file in database first u convert it to byte arrya nad save it.
In the database(MSSQL 2005) the datatype of that filed is varbinary(MAX).
I hope you are using asp:FileUpload control for uploading the file.It have a proeprty named FileBytes, we can convert this file into binary
byte[] FileData;
FileData=FileUpload1.FileBytes;
and u can inert this binary arry to DB
I hope this ll help u
All I ever wanted is what others have....
CrazySanker
All I ever wanted is what others have....
CrazySanker
|
|
|
|
|
Hi ,
I need to implement breadcrumbs as an usercontrol in my website with directory structure.Please let me know the approach or useful links that will be helpful in creating the same.
In a datagrid that supports pagination,how can we display the first,last,prev and next pagee without the support of storedprocedures?
Any valuable suggestion appreciated.
Thank you,
Regards,
Deepa.
|
|
|
|