|
Hi Devs,
I am planning to develop a webcam application which can say detect your eyes and place a sun glasses onto your eyes. And then you can select which one suits you best.
There are couple of website already doing this but I just want to implement it myself out of interest.
But i have no idea where should i start looking for it and if there are any examples online.
Can anyone please guide me the right path.
Thank You
Andyyy
|
|
|
|
|
Need help on the format of the produced output of the HtmlWriter class.
I need to make properly indent the tags in the final rendered output.
Sample:
string[] Names = new string[]
{
"Johnny",
"Mindy",
"Jossy",
"Kreuger",
"Marco"
};
HtmlTextWriter writer = new HtmlTextWriter(new StringWriter());
writer.RenderBeginTag(HtmlTextWriterTag.Ul);
foreach (string name in Names)
{
writer.RenderBeginTag(HtmlTextWriterTag.Li);
writer.Write(name);
writer.RenderEndTag();
writer.WriteLine();
}
writer.RenderEndTag();
The produced output is this:
<ul>
<li>Johnny</li>
<li>Mindy</li>
<li>Jossy</li>
<li>Kreuger</li>
<li>Marco</li>
</ul>
The closing ul tag is not indented properly.
Any work around for this, thanks a lot.
|
|
|
|
|
This looks like some whitespace is rendered before the code snippet you've provided. If this is from the Render method of a control, it may be whitespace introduced in the designer.
|
|
|
|
|
hello
i have a problem in accessing textbox from its usercontrol. i have textbox in the user control i.e in ascx file and now i want to use that textbox value in the aspx page. But I want to use it without using delegates and all. is there any simple way to access it like a regular textbox ??
suchita
|
|
|
|
|
Create a property in the ascx that exposes the value of the textbox.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
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.
|
|
|
|