|
Why don't you post in the ASP.NET forum.
|
|
|
|
|
I want set the attribute "innerText" value of an IHTMLELement,
for example, consider "innerText" value should be set to "Element",
how can I do that?
Check this link for Setattribute():
http://msdn.microsoft.com/en-us/library/aa752330(VS.85).aspx
|
|
|
|
|
Hi,
Is it possible to develop " a windows application to call a webservice which will inturn call a stored procedure ". If, so please help me in doing this.
thanks for the help
Krishna
|
|
|
|
|
yes it is.
1. create a web service application
2. in a method from your web service call your stored procedure using System.Data.DbCommand inheritance (i.e SqlCommand for SqlServer) by set it's CommandText property with name of your stored procedure, CommandType = CommandType.StoredProcedure and create it's related parameters (see SqlParameter class as sample)
3. Create a windows application (windows form or console)
4. Add Web reference from your web service address to your windows application, usually it will create a class refer to your web service object
5. call the method in step 2 from created web service class in your windows application
hope it helps
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|
|
Hi Dhaim,
Thanks for the reply..
Can you please elaborate point 2 in your reply.
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
// Is calling SP should happen here??
// my SP is generic_SP written in Sql server 2005
please provide a low level implementation as I am newbie in this field and to finish of this work urgently.
Sorry for the pressure.
please help.
Thank you,
Aditya
|
|
|
|
|
Krishna Aditya wrote: Sorry for the pressure.
What makes you think there is any pressure on Dhiam, he is doing you a favour by trying to help you. No pressure on him!.
This is pretty straight forward design and construct for a developer, why is there pressure on you to perform this if you are a newbie. Asking someone for a "low level implementation" is the same as asking for the codz, greatly frowned upon in these forums. You need to do the work yourself, including the research into how to build a web service.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Krishna Aditya wrote: I am newbie in this field and to finish of this work urgently.
Sorry for the pressure.
If it's urgent, pay to get it done. Try rentacoder[^] or work at it and figure it out.
The pressure is only on you, no one here will code for you.
|
|
|
|
|
Hello
I am about to write an application which will be responsible to transfer files between two servers. Can someone suggest me the best possible way to do that? Should I go for socket programming? or dot net remoting? or web-services?
I am open for suggestions or comments.
saq!b
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
I need to do an client-server application that send images to a client. The client will be a mobile phone with windows mobile.
Many Thanks
modified on Friday, May 22, 2009 6:54 AM
|
|
|
|
|
Raquel Barata wrote: I need to do an client-server application
then you need to start code it.
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|
|
I have two coordinates on the screen x1 and y1 and i have an object at that location.. now i have x2 and y2 which will be the destination point of my object.. I am planning to move my object 1 pixel at a time following the path from x1, y1 to x2, y2.. is there a formula that you can recommend?
|
|
|
|
|
Just work out the ratio of x2 - x1 to y2 - y1, and that will tell you the ratio of pixels to move in x versus y.
If you want reasonably smooth movement you'll need to track positions in floats.
If you want very smooth movement you'll need to take the time per update frame into account.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
yeah i was asking for the ratio formula
|
|
|
|
|
Try something like :-
float ratio = (float)(x2 - x1) / (float)(y2 - y1);
The casts make sure you don't truncate the result.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
well actually from what i understand the locations in the C# controls such as a form and a panel are by pixels and of the INT data type. I'm trying to move it pixel by pixel.. I do remember I had a formula taught to me by my math teacher that given the coordinates of both ends of a straight line, you can solve all the POINTS in between.
|
|
|
|
|
What you are looking for is called Bresenham's algorithm
Clickity[^]
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Silvyster wrote: from what i understand the locations in the C# controls such as a form and a panel are by pixelsand of the INT data type.
The problem you'll have is that unless you're moving your object exactly along the X or Y direction, or at 45 degrees, you won't have an integer number of pixels in each direction.
What you need to do is something like :-
float ratio = (float)(y2 - y1) / (float)(x2 - x1);
int step = (x2 > x1)? 1 : -1;
float newFloatY = y1;
int newX = x1;
for (int loop=x1; loop!=x2; loop+=step)
{
newX++;
newFloatY += ratio;
int newY = (int)(newFloatY);
}
You'll need to modify it if you want to move by 1 pixel in Y, and cope with special cases like moving exactly horizontally or vertically, but those are "left as an exercise for the reader"...
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
Hi,
I am working in windows application in which I need to create Timers dynamically based on number of records in database. I am able to do that but the problem is I can't identify which timer is raising the tick event.
Below is the sample code on which I am working.
public Form1()
{
InitializeComponent();
System.Timers.Timer timer1 = new System.Timers.Timer;
timer1.Enabled = true;
timer1.Interval = 5000;
timer1.Elapsed += new ElapsedEventHandler(TimerTick);
timer1.Start();
}
public void TimerTick(object source, ElapsedEventArgs e)
{
string s = ((System.Timers.Timer)source);
string s1 = e.ToString();
}
Thanks in advance
|
|
|
|
|
Hmmm.. i have a feeling your going about this the wrong way...
What are you trying to do with each timer?
There is nothing in your example code that shows you doing anything with the instance of a timer that would need it to be identified
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi
Thanks a lot for reoplying so soon
I cant tell the requirement completely. Let me explain in brief.In database I have a set of records in this structure.
ID ConsumerID Time Interval
1 5 5
2 6 7
3 8 9
Now I have 3 records in database. I need to create 3 timers and set intervals accordingly.
For every 5 secs I should get details regarding ConsumerID-5
For every 7 secs I should get details regarding ConsumerID-6
For every 9 secs I should get details regarding ConsumerID-8
Thanks
|
|
|
|
|
Ok well you could go with Davey's idea of inheritance or you could use the timer's 'Tag' property as follows...
when creating...
Timer t = new Timer();
t.Tag = contactID;
then in event handler...
Timer t = (Timer)sender;
if(t.Tag != null)
{
string contactID = (string)t.Tag;
}
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
The System.Timers.Timer doesn't have a Tag property - only System.Windows.Forms.Timer - an int ID property for each MyTimer : System.Timers.Timer would be the easiest way to go here.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
DaveyM69 wrote: The System.Timers.Timer doesn't have a Tag property
My bad
Yeah, in that case I agree with you method
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
You can cast to a Timer from the sender
if(sender is System.Timers.Timer)
{
System.Timers.Timer thisTimer = sender as System.Timers.Timer;
} If you want you can give it a property such as an int for ID or a string for Name etc by subclassing e.g.
public class MyTimer : System.Timers.Timer
{
public string Name
{
get;
set;
}
} ... and then use MyTimer instead of Timer .
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Thanks a lot Dav I got it by using your method
|
|
|
|