|
can u give me one example for that please??
suchita
|
|
|
|
|
An example of how to create a property?
If you can't figure that out on your own, give up and change careers, everyone will thank you.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
funny. i already did one but that one is not working.. thats why i am posting my question here..if you can't do that, better say I can't .. thats fine..
suchita
|
|
|
|
|
SayamiSuchi wrote: if you can't do that, better say I can't
Don't get cocky. Look around, I think I've demonstrated ability well enough.
Show what you have tried. Creating a property is very, very, very simple basic knowledge.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I used delegate thing and its working fine... thats not the problem. But i am just wondering whelther i can use in other way...
WriteThisMessageToThePage1.sendMessageToThePage += delegate(string message) { txtNeededDate.Text = message; };
this one working absolutely fine.. just thinking the other way..
suchita
|
|
|
|
|
also i am trying to use findcontrol property and its not working.. i dont know what parameter i'm missing..
my ascx page name is usercontrol.ascx and it has one textbox named textbox2.
and my aspx page has one button named button1 and textbox named textbox1.
now i am trying to show the value of textbox2 in textbox1 on button1 click event.
protected void Button1_Click(object sender, EventArgs e)
{
usercontrol1 u = new usercontrol1();
string s = u.FindControl("Textbox2");
TextBox1.Text = u.ToString();
}
This is not working. I doubt the way i used the textbox2 is wrong but i dont know where i'm wrong.
suchita
|
|
|
|
|
Hi Suchita,
Based on this flow of yours:
1. Fill some value in Usercontrol ascx: ValueA
2. Press buttonA in ASPX parent page.
3. buttonA, brings ValueA in the textboxA of ASPX parent page
4. buttonA, send the ValueA in DB to store.
Try this:
public string txtBoxInUCExposed
{
get { return txtBoxInUserControl.Text;}
set { txtBoxInUserControl.Text = value}
}
string valueInUCTextBox = myUC1.txtBoxInUCExposed;
|
|
|
|
|
My opinion.
If the OP could not have figured out how to do this simple task then giving it to him like this did not help and just made hime dependent on others and a burden to his team, now and in the future.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
if i take your opinion, i wont be learning ..instead i will be more frustrating...
how can one learn if the confusion I have wont get out of it. I need help for that and thats what this forum is about. Dont you think so ??
suchita
|
|
|
|
|
I've said it many times now. Creating a property is a very, very, simple basic task that you should have learned long ago. Every basic beginner book coveres it. Almost every code sample has one. If you can't figure it out, then quit, please.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i am using dot net after 4 years.so i forgot and confuse. i am restarting it again and enjoying it too. What is your problem ? If you can't help, dont post please...
suchita
|
|
|
|
|
I don't care long it has been since you last used it. Read the response again, basic simeple task covered by many, many, many, many resources.
If you can't do basic tasks, then please don't bother us
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
nobody born with great mind... we need practise and guidance.. thats why we all are here in codeproject...
suchita
|
|
|
|
|
Mark Nischalke wrote: My opinion.
Got that! But out here we find lots of people asking without trying! We keep on saying, try first, show your effort. I found this OP has put effort and tried. Might be some reason(which looks like low in confidence) why OP was unable to resolve it after pointing out the way...
So, to me, it looked like instead of discouraging, we should provide OP with what he is looking for. From this, he can learn what was pointed out and what was he not able to search. This will add to OP's learning curve. Not everyone can have same pace and level of understanding. One should be provided some time and help to pace up!
|
|
|
|
|
|
Thank you to both of you..... Its a long time I didnt use dot net... So i forgot most of the part. that's the problem with me.. Slowly once again i am getting into it. thank you sandeep..
suchita
|
|
|
|
|
Hey what's up here? discuss your differences outside the forum a property is very simple to learn! I have learned have you searched in google?? I know nobody is perfect but when you have the opportunity to search something without posting, just search and don't mess with stressed people like us! thanks
|
|
|
|
|
|
Sorry if my question is a bit out of the normal and my approach is less briliant. Im under education and currently on internship at a company being the only programmer on a website at the moment. To make things even better its also my first experience with ASP.NET untill now ive only made C# applications.
I have a problem with a webservice that runs threaded.
The webservice it self is rather simple. All code used to start the webservice thread is shown here
public virtual OverwriteCollectionResponse OverwriteCollection([System.Xml.Serialization.XmlElementAttribute(Namespace="http://XXXX/MAP_INHOUSE_OUT/COLLECTION:MESSAGES:V1", ElementName="OverwriteCollectionRequest")] OverwriteCollectionRequest overwriteCollectionRequest){
WebserviceThread webservice = new WebserviceThread();
webservice.overwriteCollectionRequest = overwriteCollectionRequest;
Thread thread = new Thread(new ThreadStart(webservice.OverwriteCollection));
thread.Start();
return new OverwriteCollectionResponse(1);
The real method takes up to two hours to run depending on amount of data. I have read about asyncrone webservices after making this but im unsure if thats the right choice to solve my problem.
The webservice is running on a IIS6 server configured to have session timeout to 300 min.
The configuration for timeout in the config file is the following
<httpruntime maxrequestlength="1000000" executiontimeout="3600">
The problem is the following:
After a random amount of time (can be all from 15 min to 25 min havent seen it below or above that) the Thread stops. Only prof that it stops is that the log file isnt updated anymore. (Using NLog as logger).
Also the data in the database isnt updated more.
Anyone that have an idea to why the thread suddenly stops?
Hope my question is clear else dont hessitate to ask for more info
Thanks for any help in advance
HE
modified on Thursday, May 20, 2010 9:32 AM
|
|
|
|
|
It sounds like the request is being killed for taking too long. ASP.Net will kill long running requests after a set amount of time ~20 minutes I think.
But if your process takes that long maybe a webservice isn't the place to do the work. Is there any scope for you to do the work in say a windows service?
Otherwise, I think we'll need a bit more information about what you're trying to achieve so we can suggest a better way - what you're doing now just looks wrong.
|
|
|
|
|
Any way I can make it allow to run longer?
A windows service might do it but I have no idea how to make one that will fulfill the demands.
I will try to describe what im trying to do as good as I can.
There is an excisting SAP system with information about products.
Im working on a system that recives these informations from SAP with a webservice and stores them in a database to then show them on a webpage and let the user create catalogues based on the informations.
In the long run the idea is that every time there is made a change in SAP its send to the webservice (around 100kb of data). Now there is made some changeings to the system and we need to send all data from SAP to the webservice from scratch. Therefor its needed to send alot of data to the webservice.
If there is a way to change the alowed running time it might help.
Best Regards
HE
|
|
|
|
|
Yes there is, but you'll need to investigate the IIS configuration and ASP.Net settings yourself as I don't have time.
My experience with this type of thing is extending the request lifetime isn't the best way and is problematic and difficult to debug. As you know, the process just dies with no notification of which timeout barrier caused the problem.
I strongly suggest you look at another way to solve this, maybe many smaller requests? If this mechanism needs to reliable you may also want to look at some sort of queuing mechanic (MSMQ). WCF offers nice way's to handle both and it's well worth educating yourself in the technology.
|
|
|
|
|
Well thanks for the help They sure are gonna love me when I suggest they get the SAP guy to make it posible for them to send less informations :P
Ill try look at it and figure out what to use to solve it.
Best Regards
HE
|
|
|
|
|
How can a company have SAP and not have ETL tools in place?
Anyway, you might look into the SQLBulkInsert object rather than using an ORM. Something like this should be done in a transaction which it obviously isn't since you get partial updates when it times out. SQLBulkInsert will both be much faster and transactional.
|
|
|
|
|
The problem is not that its not working from the SAP part. That part of it works great all data arrives at the webservice from where its going to get bad...
Anything thats not ORM tool might do the trick... only issue is to make sure that the information is correct in form of what the ORM tool want it in when its reading it.
Maybe I just should let it go and ask the guy next to me thats good with SQL and ASP.NET <-> SQL to make a new webservice that saves the informations in the database. After all hes the one going to do mantinance on it for the next few years.. (Im happy im not him)
|
|
|
|