|
J walia wrote: i have created some xaml page using kaxaml software.
You can convert to silverlight from kaxaml software..! I think..!
XAML ..? Are you talking abt silverlight..!
I think You will get better help when you post this question in silverlight forum
try in here
http://www.codeproject.com/Forums/1004257/Silverlight.aspx[^]
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Hi,
I have a master page and a 'home.aspx' page in the root folder,
there is another page 'details.aspx' in a folder called 'files' in the root.
There is a javascript file 'jsfile.js' in another folder called 'js'.
I reffer the path of javascript file in masterpage as src='../js/jsfile.js', its not working for 'home.aspx', but it is working for the files in folder 'files'.
'../' take the path to root..ryt?? then what is the problem for the files in root folder?
Thankyou
YPKI
|
|
|
|
|
yesu prakash wrote: '../' take the path to root..ryt??
No... ../ takes you up one level from the level you are currently on...
If you were in d:\a\b\c and referred to file ..\file.txt, you would actually be referring to d:\a\b\file.txt
|
|
|
|
|
Shamefully I come to you all. I have searched high and low with varying success on how to create, post, and receive a SOAP message to a simple Web Service. I am terribly confused on how to go about it with the different types of ways to do it. I don't consider myself to be a noob but I feel like a babe in the woods right now.
Therefore I am at the point where I am not too proud to beg. If there is anyone that knows of a good tutorial (that is clearer than what Microsoft offers, a slightly working example or any complete documentation on how to create, post and receieve a SOAP package to a Web Service I would be more than appreciative.
Thank you to all that even consider my request.
Also I apologize for being such a bug with my request. I assure you though that I spent more than a week investigating and trying things out. I do not take anyone's time for granted.
Happy Holidays....'
F
|
|
|
|
|
Ok. Here is the steps to create a simple web service.
1 - Create an empty solution in the Visual Studio. I assume you are using VS2008.
2 - Right click on the solution icon in the solution explorer and choose add new project.
3 - Choose the "ASP.NET web service application" template and click "OK". Give it any name you like. I named it "Webservice1".
4 - Open the service1.asmx.cs file and add the following code.
[WebMethod]
public string GetGreetings(string yourName)
{
return "Have a good day, " + yourName;
} The WebMethod attribute indicates that this method can be called by a web service client.
5 - Right click on service1.asmx and choose "View in browser".
You have created a service now. We need to create a client to use this service.
1 - Right click on the solution icon in the solution explorer and choose Add - New project. Select Console application template.
2 - Right click on References and choose Add service reference.
3 - Give the URL and click ok. VS will generate the proxy classes depending on the WSDL.
4 - Write the following code to use the service.
class Program
{
static void Main(string[] args)
{
var client = new Service1SoapClient();
string greetings = client.GetGreetings("Chuck Norris");
Console.WriteLine(greetings);
}
}
Best wishes,
Navaneeth
|
|
|
|
|
Navaneeth,
You are about to become my hero!!!
Thank you very much for the time you took to detail this out for me. Works just like you would expect it to. Again my deepest thanks.
Now, my problem is that when I try to run it again a another WebService, I get an error stating that the message SOAP message is malformed. I see that the SOAP-ENV is missing (I have invested in a sniffer program to assist) so that is where the problem lies.
Is there anywhere that I could make sure that the SOAP message contains this or any other tag? Is there a way to manually build the message?
|
|
|
|
|
Usually you don't care about the raw SOAP message because VS generates proxy classes for it and you work directly with these classes. When you change the web service, you need to update the web reference which will regenerate the proxy classes with the latest SOAP message format.
Best wishes,
Navaneeth
|
|
|
|
|
I have a Admin folder that I have secured with the Asp.Net Configuration page. I am using the Login control to grant access to admin users.
The whole thing has worked fine on my machine, but I've just ftp'ed all my files to a web hosting site and the Login no longer works.
I know the problem is due to an incorrect connection string but the Login control does not provide a mechanism for changing it. So, how do I tell the Login control to point to the database on the web host?
Any help would be greatly appreciated! (By the way, I've spent two hours on google before posting this message)
If my answer has helped you, one of my articles may also be a help. Also remember that your best friend's name is google.
|
|
|
|
|
From your description is sounds like you need to update the Web.config file with the correct connection string. Have you already looked there?
|
|
|
|
|
Yes I have.
If my answer has helped you, one of my articles may also be a help. Also remember that your best friend's name is google.
|
|
|
|
|
Did you also check the web.config found in the admin folder? That's the most likely place to find the errant connection string. Is your connection string encrypted or open text in the web.config?
|
|
|
|
|
I finally figured it out. The solution lies in the secured folder's web.config file. The following tags replace the default Login connection with a specified connection:
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="server=216.26.169.23;
database=ASPNETDB;uid=midwest;password=qazwsx1234;"/>
</connectionStrings>
Thanks for the willingness to help! (Now where is all that hair that I pulled out?)
If my answer has helped you, one of my articles may also be a help. Also remember that your best friend's name is google.
|
|
|
|
|
ElseIf strTimeFormat = "HHMMAMPM" Then
Dim Format1 As String = "(1[0-2]|[1-9])([0-5][0-9])*(a|p|A|P)(m|M)"
Dim TryValidateFormat1 As New System.Text.RegularExpressions.Regex(Format1)
Return TryValidateFormat1.IsMatch(strTimeValue)
The above is my code to validate time.
This works fine in most of the senario but breaks in this kind
eg:
if i give input as 0859PM this works good.
if the data is xxxxxx649PM /AM it does not validate it. instead it says validation passed but it should fail actually.
can any one help me in this.
cheers
chandu
|
|
|
|
|
Good Morning,
I am trying to write a simple time out javascript to accompany an ASP.net application. The default time out for the application is 20 minutes. Currently, when it does time out, it reverts to an ugly error page. I would rather that it either logs the user off or simply sends him to the login or index page. Although I have found some very seemingly simple samples, I cannot get anything to work. I do not know if it makes a difference, but I am using an internal (<Iframe>) to rotate pages within a main page. I do not why that should make a difference since the session value is based on the session and not the page. Either way, I have tried posting the script on both the Main page that displays the frame and on the inserted frame page as well. It makes no difference. These are the two scripts that I have tried:
Style 1 is supposed to give the option to take the user to a new page if it is not responded to:
function warnuser()
{
if (confirm("There has been no activity for some time.\nClick 'OK' if you " +
"wish to continue your session,\nor click 'Cancel' to log out.\nFor your " +
"security if you are unable to respond to this message\nwithin 2 minutes you " +
"will be logged out automatically."))
{
//post the page to itself
document.location.href = "Main.aspx"
}
else
{
document.location.href = "Index.aspx"
}
}
Style 2 is simpler and simply posts a warning:
function SessionAlert()
{
alert("Your Session will time out in 19 minutes");
}
setTimeOut("SessionAlert", 1 * 60 * 1000);
I tried setting the second one for just a minute just to see if it would work. It doesn't. Following is the setting that is deployed on the web.config page in the ASP.net applcation (and it does time out in 20 minutes):
<sessionState mode="InProc" cookieless="false" timeout="20" />
Any assistance is greatly appreciated....Pat
|
|
|
|
|
Good thinking...
The way we all do in your scenario is we put a variable in session,and try to call the Variable. Say:
Session.Add("IsAuthenticated", true)
Now for every call to the server we validate this using
if(Session["IsAuthenticated"])
If Session cant be retrieved, we will see if the current request url is Login page. If not we pass it to Login using
login.aspx?RetUrl=yourcurrentpage.aspx
Thus if the user successfully logs in again, it will be redirected to original page.
And regarding Session Timeout exception, we just ignore it using try/catch.
This is our way of doing this, as we handle all of them in Server.
Well, if you like to handle this is client, It is better to keep a variable variable in Javascript which will hold the time when the last call is made. You might use this javascript in OnLoad event of Body.
var responsetime = new Date();
Now whenever any call to the server is made, you just use
var thisTime = new Date();
var difftime= new Date();
difftime.setTime(thisTime.getTime() - responsetime.getTime());
if(difftime.getMinutes() > 20){
alert('Session Expired');
location.href='login.aspx';
return false;
}
else
return true;
I hope this would seem to be a better approach to you.
Cheers.
|
|
|
|
|
Hello. I am uploading a video file to a remote server. After that i am converting it to flv file. This process may last upto 10 minutes depending on file size. If i show such label " Preview file is being prepared. Please wait." , there is no problem. But i dont want such an unneccesary delay, and to process it at background. So i wanted to place a link "Click to return to homepage." or auto redirect to homepage. But page didnt load until the process finished. How can i deal with this problem.
|
|
|
|
|
How you are uploading file on server ? Are you using AJAX any where for it ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Create an IFrame and upload the file from there. This will not affect the page to full postback. Show the message there.
And also if possible make an ajax call to the server, form the mail application, to detect how much data is been uploaded to the server till now and detect appropriate message.
|
|
|
|
|
I have a time series data in which a numerical indicator fluctuates over time. If I want to find out for which given day, this indicator has crossed above 30 in the past 3 days. Is it possible to write a SQL query that retrieve this information?
The logic to check for the crossing movement is:
IF indicator(day x) > 30 AND indicator(3 days ago from day x) <30 THEN
Return "YES WE HAVE AN UPWARD CROSSING MOVEMENT THROUGH 30 FOR PAST 3 DAYS!"
END IF
Can this be accomplished using a SQL CASE statement with a HAVING clause or something else?
I'd greatly appreciate any help! If possible please provide a sample code
By the way I really want to thank you guys for helping me recently...
|
|
|
|
|
This question will be best suited in the General database forum. Please make sure to post in correct forum from now on.
Just saw you have posted it there as well. Do not cross post. It is considered rude.
Assuming, your database fields are called indicator and date, try this:
select indicator from yourTable where indicator > 30 and datediff(date, getdate(),date) <= 3
if(@@rowcount > 0)
select 1
select 0
(not sure about order of getdate and date in datediff, you can check that through the query though)
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
modified on Tuesday, December 15, 2009 11:08 AM
|
|
|
|
|
Thanks a lot for your help D@nish, sorry about cross-posting.
|
|
|
|
|
Hi D@nish, the above query doesn't seem to take the condition of [indicator from 3 days ago which is less than 30] into account....
For instance, my table contains two columns:
Date-------------Indicator Value
12/16/2009-------45
12/15/2009-------33
12/14/2009-------29
12/13/2009-------23
12/12/2009-------27
12/11/2009-------35
12/10/2009-------29
12/9/2009--------24
...
...
I want to find out for which date, the indicator value had crossed from below 30 three days before to above 30. The answers are: "12/16/2009" and "12/11/2009". How should I contruct the query to do so?
Many thanks again.
|
|
|
|
|
James Shao wrote: The answers are: "12/16/2009" and "12/11/2009".
12/15 should also come. Right? 12/13 is less than 30 and 12/15 is more.
I hope this should work.
select tbl1.date as fromDate,tbl2.date as toDate, tbl1.indicator as fromValue, tbl2.indicator as toValue from yourtable tbl1, yourtable tbl2 where tbl1.indicator < 30 and tb12.indicator > 30 and datediff(date,tbl1.date,tbl2.date) = 2
(I have not tested the query so it may give some error)
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Hi guys,
I have a xml document as below and in Xslt I need to get the person name on the basis of email id as in below xml file , contributor node contain email id and associated name is included in Epic node can any body help me to get the name for each contributor through xpath?
<ONIXMessage>
<Product>
<Contributor>
<Email>Rohit@gmail.com</Email>
</Contributor>
</Product>
<Product>
<Contributor>
<Email>Rohit@gmail.com</Email>
</Contributor>
</Product>
<Epic>
<Person>
<Name>Rohit</Name>
<Email>Rohit@gmail.com</Email>
</Person>
</Epic>
</ONIXMessage>
|
|
|
|
|
Rohit16db wrote: person name on the basis of email id as in below xml
Why Duplicate entry for Product->contributor->Email
XSLT is used to transform your xml into XHTML. You can easily move into some node decendant to the current one using XPath.
Tell me what exactly you require.
See
http://www.w3schools.com/xsl/[^]
for reference.
|
|
|
|