|
Hi
You log information shows that code written at line 19 is creatig the error.
Hy Chanhan wrote: at Modules_ContactInformation.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\web\Modules\ContactInformation.ascx.cs:line 19
Please check whats happening there. Or post some code block related to that line.
Thanks,
Arindam D Tewary
|
|
|
|
|
My client uses the Dynamic Web Service to get data.
There is Class ClassA in Web Service. When get the one object of the ClassA from the Web Service, I can not change this object from type object to ClassA event I define the same class, ClassA in my client.
Is there any way to use the ClassA object data?
|
|
|
|
|
You can send or recieve objects from webservice.It has to be in XML form.One thing you can do ,convert your object in byte array and at recieving end, you can again cast it in your class type.
Have a look
|
|
|
|
|
Brij,
Thanks for your reply.
When the object is the type of String or other system type, there is no problem.
But it has problem when use the customer define class.
I want to know why data cannot be converted between these two class with the same define but in different place.
|
|
|
|
|
Hello, I have found in JAVA, that, every class no matter how small it is, must be placed in a different file with the class name. But in C#, I found that it is not necessary, I can put many classes in the same file. I thought it is a flexibility in C#. But, my ReSharper and CodeRush refactoring tool suggesting me to place my classes into different files. From that point of view, I am thinking, IS IT just a best practice to place all tiny classes into different files with the class names which is enforced in JAVA ?
modified on Wednesday, April 7, 2010 4:27 AM
|
|
|
|
|
I always have simply because I'm not always working solo and when I go, there could be a team who comes in later to add enhancements. That being the case, having multiple classes in one file runs the risk of unnecessary file locking because someone wants to work on class A but it's in the same file as class B which is being worked on by someone else at the time.
|
|
|
|
|
Thanks, so, I got one good reason to use different files for classes.
|
|
|
|
|
I believe it is as 'your choice'. The reason being
1. in C# microsoft introduced the concept of partial class which allows you to span your class across multiple files.
2. in C# any class finally yeild a 'dll' which does not bother about how physically the class was written
3. There are multiple source control software available which allows multiple person to work paralelly. Lock and conflict is is at all discouraged and these are taken as normal mode of working and let the tool work to get the maximum benifit out of it. ( MS TFS allows to work multiple person simultanously ).
And from my experience I didn't see anyone at least in C# that it is a best practice to have classes in separate file. It could be project specific ( may be where you might be working they want for some reason or so) best practices, but not a general best practice.
Thanks,
Arindam D Tewary
|
|
|
|
|
Hi all,
I am working on a windows application in which I am using a NotifyIcon. When I try to trigger its click or ballontipclick event, it do not responds.
But in windows application it works fine.
any idea....
Regards....
|
|
|
|
|
You are not at right place.This is ASP.NET forum.Post your problem in C# section.
|
|
|
|
|
Friends,
have any problem with Ajax Tab Container and IE 8 latest version. because tabcaontainer wrking(visible) in all other browser's except this.
Thank you.
|
|
|
|
|
I used MS Chart in my aspx, but now i want to print MS Chart only but How can i print MS Chart using asp.net
|
|
|
|
|
|
Hello Friends,
I want to print in Landscape format. And here is my code below
.landScape
{
width: 100%;
height: 100%;
margin: 0% 0% 0% 0%;
filter: progid:DXImageTransform.Microsoft.BasicImage(Rotation=3);
}
........
but this code is not working
|
|
|
|
|
|
i've stored an image in binary format in database using ADO.net and i want to display the image in adrotator or into an image type control..but i don't know which function to use;
i connected the adrotator to sqldatasource through a configure datasource wizard and when i tested the query there in wizard it worked f9...but on running the application no image is displayed in adrotator.....CAN ANYONE HELP ME...??
|
|
|
|
|
Here is the sample code to show in page from database which i used earlier..!
byte[] arrContent = null;
DataTable dt = new DataTable();
DataRow dr = default(DataRow);
int id = Convert.ToInt32(Request.QueryString["id"]);
dt = PlayerInfo.ImagSelect(username);
dr = dt.Rows[0];
arrContent = (byte[])dr["photo"];
int length = arrContent.Length;
Response.ContentType = "image/JPEG";
if (length!=0)
Response.OutputStream.Write(arrContent, 0,length);
Response.End();
You can check this link to sample Image Control..!
ships_agr wrote: i connected the adrotator to sqldatasource through a configure datasource wizard and when i tested the query there in wizard it worked f9...but on running the application no image is displayed in adrotator
It Should be converted to binary format .You can visible the image thr wizard but not in page..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Hi All,
I want to store viewstate of entire page. Then on next visit to a page I want it to restore it's state by applying the viewstate I had stored. I found this article very helpful for this Persisting the state of a web page[^]
However it did not solve my problem completely. This article shows how to store viewstate an POST data of a page and then restore it back using stored data. To restore data from POST you need to turn off some security feature. I can't do that so I removed the code which was responsible to store and restore POST data. So now I have a code which just stores viewstate and restores it back.
With this change most of the things started working for me but RadioButtonList is not able to maintain the selected item. With some more experimentation I found out that selected item of RadioButtonList is not stored in viewstate, it is stored in POST data. Is this a correct conclusion?
If it is correct then does that mean I will not be able to restore page completely by storing only viewstate?
Regards
Shrikant
|
|
|
|
|
I don't see the point in this. If you want to restore the page then persist the values and set the controls appropriately when restoring.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Yes you are correct, I can do that by writing a code which will handle storing restoring values for each control. But that code will have maintainaece problem, everytime I add new control I will need to change the code.
Also if I can figure out a way to store restore page state it can be applied to multiple pages with lesser efforts.
-Shrikant
|
|
|
|
|
Shrikant Kale wrote: everytime I add new control I will need to change the code
If you are constatnly adding new controls to a page then you need to evaluate your design process.
Shrikant Kale wrote: writing a code which will handle storing restoring values for each control
Ever heard of databinding?
I stand corrected. I said I saw no point in this, now I see the point is laziness and ineptitude.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
My idea was to have a generic way to restore the state of page. If this is possible then I think it will be helpful.
Thanks for your comments.
|
|
|
|
|
You might give a try 'override'ing LoadViewState and SaveViewState() method of your webpage. This methods will allow you to store you custom viewstate to store and retrieve ( of cource your ways of implementation may be storing in Db and retrieving from there or in other way that you may prefer.).
NB: More after I read the link you have refered to: I posted my above reply before I read the location that you refered to. After reading that article I am thinking what difficulty you are facing adding couple of items like selected radio button list. I apolozise if my post does not make sense.
Thanks,
Arindam D Tewary
|
|
|
|
|
Hi friends,
help me to get multiple reports
i have created two crystal reports, one using 'bar chart' and second using 'pie chart', i have implemented in two different web pages, then the result is exported to two individual pdf files...
now, user asking me to build the two charts in one pdf file only, in 2 pages
how can i ??
do some needful friends...
icanmakeiteasy
|
|
|
|
|
Combine the two PDFs using a .Net PDF manipulation library like iTextSharp.
|
|
|
|