|
anu_anu wrote: StreamReader reader = new StreamReader(response.GetResponseStream());
string str = reader.ReadLine();
Check The above str reading any document in the form of xml by keeping a break point may tht the reason..!
|
|
|
|
|
|
Check the response stream, and keep a break point on the bolded text ,extract the string str, .and check the string format.Is it coming in the form of XML.
if it is comming..!
use ReadtoEnd metod
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
using (StreamReader sr =
new StreamReader(objResponse.GetResponseStream()))
{
result = sr.ReadToEnd();
sr.Close();
}
|
|
|
|
|
Ya.. It is in the xml format.Is it possible to assign the xml string into a new xml file.
|
|
|
|
|
|
In my application I want to read some data diplaying in a webpage.How can it be possible.Can you plz give me a clue.
Thanx in advance.
|
|
|
|
|
One way is to use the WebRequest object to retrieve the page and then parse it for the information you want.
This article[^] may help.
|
|
|
|
|
Hi All Is there any style is HTML so that i Can blink My Label font
|
|
|
|
|
|
How shuld i use it.. there is no tag comming in Intellisense...
|
|
|
|
|
Just try it man. The tag wont come in asp.net . But it will work fine.
|
|
|
|
|
Hi Ther i tried it Like
<blink><asp:litrel id="sas" runat="server" text="Sachin">
It doesnt Work
|
|
|
|
|
<blink><asp:Literal ID="txtuname" Text=" Username" runat="server"></asp:Literal> </blink>
I tried its working well.
|
|
|
|
|
Blink doesn't work in Internet Explorer. This is from Wikipedia[^]:
The blink element type ... is still supported [by] Mozilla Firefox... It is also supported by the Opera Internet Browser. Microsoft's Internet Explorer and Apple's Safari/WebKit do not support it, even in its CSS incarnation.
|
|
|
|
|
Also you can use style text-decoration=blink;
.blinkytext {
font-family: Arial, Helvetica, sans-serif;
font-size: 1.2em;
text-decoration: blink;
font-style: normal;
}
|
|
|
|
|
|
ASP.NET function:
public int withparam(int x)
{
int y;
y = x + 10;
return y;
}
HTML button
function Button1_onclick()
{
<% var st = withparam(10); %>;
document.write(st);
}
When i click on button, it says var st could not be found.
Please let me know where the syntax is wrong and is this the right way
|
|
|
|
|
you are getting this error as you have declared variable 'st' in <% %> block, means it is declared server side and you are using it at client side. so declare it at client side and assign value by calling server side method.
var st;
st = <% withparam(10) %>;
document.write(st);
|
|
|
|
|
I have applied your code.
st = <% withparam(10) %>;->It does not work.
Please let me know the solution.
|
|
|
|
|
amittinku wrote: It does not work.
what does mean by this? do u got some error or what?
|
|
|
|
|
no error as such.
It does not return anything, i mean return null.
|
|
|
|
|
Replace the line
st = <% withparam(10) %>;
with this
st = <%= withparam(10) %>;
it would work surely. i have tested it.
|
|
|
|
|
use javascript code for withparam function instead of server side code
// JScript File
function withparam(x)
{
var y = x + 10;
return y;
}
function Button1_onclick()
{
var st = withparam(10);
document.write(st);
alert(st);
}
call Button1_onclick in OnClientClick
winnie
|
|
|
|
|
Yes, the withparam is the actual function to be called, i mean if we don't need any server side processing then this way would be the best.
|
|
|
|
|
Hi
I have scenario where i am uploading some reports and some values into the database on the click of submit button event in C#.
In the submit button event i have opened the database connection, and inserted the values to the db.
Suppose as soon as i click on the submit button, if i loose the internet connection, or something else happens as that moment, the values or reports wont be updated to the db. how should i check this.
we put our code in try and catch block to catch any exception. we can throw an exception to the user in the catch block if it doesnot update the db. but before we use our "conn.open() method to open the connection to db, how to check if our request has reached the server or not? (as i told in the worst case scenario) can someone help me with this?
Thanks
KSR
|
|
|
|