|
|
Hi there,
I'm writing a web service that's supposed to monitor client out there, using web clients.
I'd like to allow a user to read a status report using a web browser.
The naive solution i had thought of was having an <index.html> file, and updating it when needed.
The problem is, updates may need to be made very often.
Another problem may be that the web service might not have privileges to change the file, since it will be held by the iis, while serving it to the user.
Any good ideas or tips?
Thanks in advance,
Summer Bulb
|
|
|
|
|
A webservice does not have a file to change. It should provide access to services, such as, setting or retrieving data. I'm not very clear on what you are attempting to do or what you want to accomplish.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
The idea is as follows:
Multiple clients will be pinging the web service to indicate activity.
The web service will store the ping information.
I would like to be able to display that information to a user useing his web browser (with a html file or something like that).
Am i clear now?
|
|
|
|
|
Ok, create an aspx page that reads the data and displays it, you know, basic ASP.NET.
If you are thinking you can use the web service to display the page then you don't understand what a webservice is or how to use it.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Assuming your web service consists of one or more asmx files, all it would take IMO is one or more aspx pages that present the required information. Mind you, I haven't tried this, however I don't expect there to be any problem. You could use a database (or a static class) to hold the shared information.
|
|
|
|
|
Hi,
i've a GridView with 1000 rows,
one column of the grid is "Edit".
My problem is - when i'm press on some row (for ex. row mumber 600)
the page is set to the top,
and then i need to scroll and find the row that become editable.
How i can set the focus on the row that i selected (after i pressed on "Edit").
Can someone please help me?
|
|
|
|
|
|
I've set it at Page_Init and it works great
10x
|
|
|
|
|
you can just set this on the aspx page at the top in the declaration this might be a little easier.
Three types of people in this world, those that can count and those that can't
www.casserlyprogramming.com
|
|
|
|
|
I have a contact.aspx page
I created asp:table with rows which has txtMessage, txtEmail and btnSend controls
I placed the table within asp:updatepanel and above it I have asp:updateprogress
Now ajax seems to be working properly and updateprogress is showing
I only have one problem here
In the btnSend_Click evet, I am setting ther button enable to false which is not happening!
I also tried setting the entire table visibility to false but its not happening as well
I am not getting any error and submission is going through but without doing what I want with the button enable property
What can I do plz?
|
|
|
|
|
It should not happen. I tried and its working fine as expected.Can you post code.. Then it'll be better to answer.
|
|
|
|
|
This is the code. I just need to disable the btnSend or any of the textbox
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="panelContact" runat="server">
<ContentTemplate>
<div>
<asp:Table ID="Table11" runat="server" CellPadding="10">
<asp:TableRow ID="rowComment"><asp:TableCell VerticalAlign="Top" ColumnSpan="3"><asp:Label runat="server" ID="lblStatus" Text="Thank you." ForeColor="Red" Font-Bold="true" Visible="false" /><asp:Label runat="server" ID="lblMessage" Text="Please write your message and I will get back to you as soon as possible." /></asp:TableCell></asp:TableRow>
<asp:TableRow ID="rowHomePage" Visible="false"><asp:TableCell VerticalAlign="Top" ColumnSpan="3"><br /><asp:HyperLink ID="lblHomePage" runat="server" Text="Click Here to return to home page." NavigateUrl="Default.aspx" /></asp:TableCell></asp:TableRow>
<asp:TableRow ID="rowMessage">
<asp:TableCell VerticalAlign="Top">Your Message</asp:TableCell>
<asp:TableCell Width="10" HorizontalAlign="Center" VerticalAlign="Top">:</asp:TableCell>
<asp:TableCell VerticalAlign="Top"><asp:TextBox runat="server" ID="txtMessage" TextMode="MultiLine" TabIndex="0" Width="300px" Height="150px"></asp:TextBox></asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="rowEmail">
<asp:TableCell VerticalAlign="Top">Your Email</asp:TableCell>
<asp:TableCell Width="10" HorizontalAlign="Center" VerticalAlign="Top">:</asp:TableCell>
<asp:TableCell VerticalAlign="Top" HorizontalAlign="Right"><asp:TextBox runat="server" ID="txtEmail" Width="300px"></asp:TextBox></asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="rowbutton">
<asp:TableCell VerticalAlign="Top"></asp:TableCell>
<asp:TableCell Width="10" HorizontalAlign="Center" VerticalAlign="Top"></asp:TableCell>
<asp:TableCell VerticalAlign="Top">
<asp:UpdateProgress runat="server" ID="updateProgress" DisplayAfter="1">
<ProgressTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/loading_progress.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
<asp:Button runat="server" ID="btnSend" Text="Send" Width="100%" OnClick="btnSend_Click" />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
|
|
|
|
|
Perhaps the snippet was not posted or formatted correctly but you appear to have the both the progress control and the button inside the update panel
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Yes true
Why? Is it wrong?
So how can I do it?
|
|
|
|
|
The progress control should not be inside the update panel. See the example here[^] and while your at it read the rest of the documentation about UpdatePanels and how to use them.
Move the button outside the update panel and use a Trigger. Once again, reading the documentation will help.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thx for your replies
I noted your comments and changed my code accordingly but the button is not not allowing disable
Anyhow I have another question here please
How can I hide the UpdatePanel and all everything inside it when UpdateProgress is started?
And how can I show it back from the code if my try...returned error?
This my latest code
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="panelContact" runat="server">
<ContentTemplate>
<asp:Table ID="Table11" runat="server" CellPadding="10">
<asp:TableRow ID="rowComment"><asp:TableCell VerticalAlign="Top" ColumnSpan="3"><asp:Label runat="server" ID="lblStatus" Text="Thank you." ForeColor="Red" Font-Bold="true" Visible="false" /><asp:Label runat="server" ID="lblMessage" Text="Please write your message and I will get back to you as soon as possible." /></asp:TableCell></asp:TableRow>
<asp:TableRow ID="rowHomePage" Visible="false"><asp:TableCell VerticalAlign="Top" ColumnSpan="3"><br /><asp:HyperLink ID="lblHomePage" runat="server" Text="Click Here to return to home page." NavigateUrl="Default.aspx" /></asp:TableCell></asp:TableRow>
<asp:TableRow ID="rowMessage">
<asp:TableCell VerticalAlign="Top">Your Message</asp:TableCell>
<asp:TableCell Width="10" HorizontalAlign="Center" VerticalAlign="Top">:</asp:TableCell>
<asp:TableCell VerticalAlign="Top"><asp:TextBox runat="server" ID="txtMessage" TextMode="MultiLine" TabIndex="0" Width="300px" Height="150px"></asp:TextBox></asp:TableCell>
<asp:TableCell Width="10" HorizontalAlign="Center" VerticalAlign="Top"><asp:RequiredFieldValidator runat="server" ID="rgMessages" ControlToValidate="txtMessage" ToolTip="Please write your message!" Text='<img src="images/error.gif">' Display="Dynamic" SetFocusOnError="true" /></asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="rowEmail">
<asp:TableCell VerticalAlign="Top">Your Email</asp:TableCell>
<asp:TableCell Width="10" HorizontalAlign="Center" VerticalAlign="Top">:</asp:TableCell>
<asp:TableCell VerticalAlign="Top" HorizontalAlign="Right"><asp:TextBox runat="server" ID="txtEmail" Width="300px"></asp:TextBox></asp:TableCell>
<asp:TableCell Width="10" HorizontalAlign="Center" VerticalAlign="Top"><asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="txtEmail" ToolTip="Please enter a valid email address!" Text='<img src="images/error.gif">' Display="Dynamic" SetFocusOnError="true" /><asp:RegularExpressionValidator runat="server" ID="rgEmail" ControlToValidate="txtEmail" ToolTip="Please enter a valid email address!" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ErrorMessage='<img src="../images/error.gif">' Display="Dynamic" SetFocusOnError="true" /></asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="rowbutton">
<asp:TableCell VerticalAlign="Top"></asp:TableCell>
<asp:TableCell Width="10" HorizontalAlign="Center" VerticalAlign="Top"></asp:TableCell>
<asp:TableCell VerticalAlign="Top">
<asp:Button runat="server" ID="btnSend" Text="Send" Width="100%" OnClick="btnSend_Click" />
</asp:TableCell>
<asp:TableCell Width="10" HorizontalAlign="Center" VerticalAlign="Top"></asp:TableCell>
</asp:TableRow>
</asp:Table>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSend" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="updateProgress" DisplayAfter="1" AssociatedUpdatePanelID="panelContact">
<ProgressTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/loading_progress.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
Thanks
|
|
|
|
|
hi,
I've to play a mp3 file on my web page
how can i implement it
|
|
|
|
|
|
<audio controls autobuffer>
<source src="myfile.ogg" />
<source src="myfile.mp3" />
<!-- flash fall back if you care about ie -->
</audio>
http://html5doctor.com/native-audio-in-the-browser/
|
|
|
|
|
|
Hi,
I've asp.net 2.0 ajax enabled web site in which I used Ajax update panels in pages. Now I want to convert it into asp.net 3.5 but it gives errors for Ajax tool kit and script manager and update panel used in pages.
I don't want to remove ajax functionality from my site, so is there a way to convert them without removing ajax update panels from pages.
On my PC I've installed both VS2005 and VS2008.
Any suggestions is appreciated.
Thank
Bajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|
|
The Version of Ajax used in 2.0 and 3.5 is different. Your web config is still linked to the 2.0, so what you can do is remove remove the dll(ajaxtoolkit) in the bin and drag and drop any control in your page and it will create the dll in the bin directory and register it in the web config and start removing the 2.0 entries in the web config and you will see at the top of your page the 2.0 and 3.5 registration is not the same, try to change.
Hope this helps
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi All,
Is there a way to do this: if a request is from a manual item, then re-fetch the data from database, and if a request is from the other web controls, say link button, then do not re-fetch data from database.
Thanks very much.
|
|
|
|
|
I guess you could use __EVENTTARGET to identify the control that caused the post-back. i.e. the control that sent the current request.
http://forums.asp.net/t/1352215.aspx[^]
Cheers,
Karthik
|
|
|
|