|
|
|
Hi,
I want "Enter" Key press count fro .doc file. I am using ASCII value of "Enter" Key . But How can I find using stramreader while reading file.
Or any other Solution for that?
Thanks,
sjs
|
|
|
|
|
Well, it doesn't seems to be related to Asp.net.
I think C# forum will be more suitable for this question.
Anyways, streamReader may not work for this.
Read your word file text using Microsoft Word Object library,
and get the text in the string. After that you can easily find
"\r\n" characters in your text.
|
|
|
|
|
Hi,
on pressing enter button to submit the login details it is working in IE but it is not working in Firefox could anyone help iam using the javascript function
function doClick(buttonName,e)
{
//the purpose of this function is to allow the enter key to
//point to the correct button to click.
var key ;
if(window.event)
key = window.event.keyCode; //IE
else
key = e.which; //firefox
if (key == 13)
{
//Get the button the user wants to have clicked
var btn = document.getElementById(buttonName);
if (btn != null)
{ //If we find the button click it
btn.click();
event.keyCode = 0
}
}
}
Thanks & Regards,
Nath
|
|
|
|
|
I am newbie to webservices
I am trying to learn about them, but got struck in the first place itself. Please help me out.
My service.cs in the web service.
--------------------------------
using System;<br />
using System.Web;<br />
using System.Web.Services;<br />
using System.Web.Services.Protocols;<br />
<br />
[WebService(Namespace = "http://localhost:1458/forumservices/")]<br />
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]<br />
public class Service : System.Web.Services.WebService<br />
{<br />
public Service () {<br />
<br />
}<br />
<br />
<br />
[WebMethod]<br />
public string welcome(string name)<br />
{<br />
return "Welcome " + name;<br />
}<br />
<br />
}
now on a button click from another web page
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
<br />
try<br />
{<br />
soapMessage =<br />
@"<br />
<?xml version=""1.0"" encoding=""utf-8""?><br />
<soap12:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap12=""http://www.w3.org/2003/05/soap-envelope""><br />
<soap12:Body><br />
<welcome xmlns=""http://localhost:1458/forumservices/""><br />
<name>Rajas</name><br />
</welcome><br />
</soap12:Body><br />
</soap12:Envelope>";<br />
<br />
WebClient mClient = new WebClient();<br />
<br />
<br />
<br />
Response.Write(System.Text.Encoding.ASCII.GetString(mClient.UploadData("http://localhost:1458/forumservices/Service.asmx", "POST", System.Text.Encoding.ASCII.GetBytes(soapMessage))));<br />
}<br />
catch (System.Net.WebException ex)<br />
{<br />
if (ex.Response != null)<br />
{<br />
Stream strm = ex.Response.GetResponseStream();<br />
StreamReader sr = new StreamReader(strm);<br />
Response.Write(sr.ReadToEnd());<br />
}<br />
else<br />
{<br />
Response.Write(ex.InnerException.ToString());<br />
}<br />
}<br />
<br />
}
The compilation is fine, but i keep getting some errors as below
"The remote server returned an error: (500) Internal Server Error."
Please help me outJack Sparrow
--------------------------------------
Defeat is not the worst of failures. Not to have tried is the true failure.
|
|
|
|
|
According to me to consume webservice in you application you need to add webreferace of webservice in you application
than to call web service you need to create objct of that and than you can call webservice.
Check on following link which give you idea about how to consume website.
<a href="http://it.toolbox.com/wiki/index.php/Calling_a_web_service_from_Asp.net">http://it.toolbox.com/wiki/index.php/Calling_a_web_service_from_Asp.net</a>[<a href="http://it.toolbox.com/wiki/index.php/Calling_a_web_service_from_Asp.net" target="_blank" title="New Window">^</a>]
|
|
|
|
|
|
Sashi,
When I call it using web reference it is working fine.
But I have to manually call the web service using xml+soap. got any ideasJack Sparrow
--------------------------------------
Defeat is not the worst of failures. Not to have tried is the true failure.
|
|
|
|
|
No Brother..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Hi all,
in my website i need to concatenate some memory streams and export like
response.binarywrite(memorystream.toarray())
in the memory stream i need to concatenate some more memory streams also,
how to do this, is it possible by means of changing by bytes or something like that??
please help me
|
|
|
|
|
Do you mean something like this?
MemoryStream MS1 = new MemoryStream(new byte[] { 0x01, 0x02, 0x03 });
MemoryStream MS2 = new MemoryStream(new byte[] { 0x04, 0x05, 0x06 });
MemoryStream MS3 = new MemoryStream();
MS3.SetLength(MS1.Length + MS2.Length);
MS3.Write(MS1.ToArray(), 0, (int)MS1.Length);
MS3.Write(MS2.ToArray(), 0, (int)MS2.Length);
Byte[] Result = MS3.ToArray();
foreach (Byte B in Result)
Response.Write(B.ToString() + " ");
Steve Wellens
|
|
|
|
|
thanks for your response,
i tried this code,
but in your code the second line MS3.write will over write(replace) the MS1.
that is my problem here as i am unable to write over, can you tell me more please
|
|
|
|
|
Really?
I included test output and it looked like this:
1 2 3 4 5 6
Nothing was overwritten.Steve Wellens
|
|
|
|
|
DataTable dt = new DataTable();
dt = _dal.ExecuteQuery_Out("select * from table1");
ReportDocument[] rd = new ReportDocument[2];
rd[0] = new ReportDocument();
rd[0].Load(Server.MapPath("ResultReport.rpt"));
rd[0].SetDataSource(dt);
dt = new DataTable();
dt = _dal.ExecuteQuery_Out("select * from table2");
rd[1] = new ReportDocument();
rd[1].Load(Server.MapPath("ResultReport.rpt"));
rd[1].SetDataSource(dt);
MemoryStream Parent1 = new MemoryStream();
MemoryStream[] Parentar = new MemoryStream[2];
byte[] parent = new byte[2];
//MemoryStream Mem;
//Mem = (MemoryStream)rd1.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
//byte[] bytearray = Mem.ToArray();
int h = 1;
for (int i = 0; i < rd.Length; i++)
{
Parentar[i] = (MemoryStream)rd[i].ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
//Array.Copy(Mem.ToArray(), parent, h);
//h++;
//((byte[])Mem.ToArray()).CopyTo(parent, h);
//h = ((byte[])Mem.ToArray()).Length + 1;
}
long length = 0;
for (int i = 0; i < Parentar.Length; i++)
{
length += Parentar[i].Length;
Parentar[i].Close();
}
Parent1.SetLength(length);
for (int i = 0; i < Parentar.Length; i++)
{
/* your code*/
Parent1.Write(Parentar[i].ToArray())
/* my code*/
byte[] b = Parentar[i].ToArray();
foreach (byte b1 in b)
Parent1.WriteByte(b1);
}
Parent1.Close();
Response.Buffer = true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(Parent1.ToArray());
here i should get both the report documents result in the pdf,
am i correct..
actually simulatenously i was working and i did some codes though here..
but am getting the last things in the out put..am i not dealing with the streams correctly like closing at appropriate place?
even in the debug mode the Parent1 current postiion is increasing while looping the second one..but am not getting
|
|
|
|
|
Concatenating memory streams is available only in .Net version 4. Means there is no option of doing that in previous versions.
you have to implement programming logic to achieve this.
|
|
|
|
|
i Tried with programing though ..
but the problem is i am getting the latest thing which is written and am not getting all?
|
|
|
|
|
Hi, I had set up a pdf maker script using ASPpdf and it had been working fine for several months. Now, when the user trys to create a pdf, they get an Invalid Registration Key error. I looked in regedit for the key as directed in the original instructions and it is there. I don't work with asp.net everyday and haven't done any asp coding in about a year. We had some trouble with the server and our network guys did some work rebuilding. there is a run command showing in the run dropdown that I guess one of the network guys ran. regsvr32 d:\Inetpub\wwwroot\bin\ASPPDFLib.dll
I'm at a loss at what to do.
the line generating the error is below, in C#.
IPdfDocument objDoc = objPdf.CreateDocument( Missing.Value );
Thanks for any help you might provide.
|
|
|
|
|
i building a application web
i have 2 sever
server 1 "ip public". page web. php
server 2 "Local network" .net2.0 - web services
the server 1 should be the one to use the web services - server 2
i need to secure the web services,
how secure the web services?
1- ws security
2- other alternative . How?modified on Saturday, February 20, 2010 7:11 PM
|
|
|
|
|
Well, your question makes no sense. Please rephrase it so that someone can understand it. Best wishes,
Navaneeth
|
|
|
|
|
how to play movie clips and .swf file in .net 3.5v (asp.net)
|
|
|
|
|
Click the "Play" button. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
I would like to have an option on the website for people to click and launch a popup. This popup would be like a chat window which always remains on the computer window wherever you drag it. So you can browse the site and still have this popup in the corner. how would we go about doing this?
|
|
|
|
|
Maybe you must watch at Here[^]... but this can't be in every page, so you may effort
|
|
|
|
|
Thanks. I see the example of having the window on the page but would I be able to place the window outside of the page and give the user the ability to move it where ever they want to.
|
|
|
|