|
netJP12L wrote: Also, how do i generate the dynamic width for different phones rather than a
fixed width.
If you want that, it depends which mobile service providers (network) your target mobile users are using, other providers will give you something called User Profile/Agent that gives you basic information about the users handset e.g. make, dimensions, browser, and more like i said it depends.
Normally when your site is requested, you can request the user profile/agent from the network and then resize your site according to the info that you get back (i.e dimensions).
Gud Luck
|
|
|
|
|
Hi,
For my new website i must receive stock quotes like this:
Example
Whats the best way to receive that?
Kind Regards,
Rupert Koan
|
|
|
|
|
I think what you want is to research WebService companies which provide stock data and you can format it any way you like.
|
|
|
|
|
|
Yes, thank!
|
|
|
|
|
On my page I have a drop down list that is populated with a list of dates that a student took classes on; the student's ID is passed to the page through a query string. There are also text boxes/radio button lists and an update button. Now when the page first loads, if I fill out all the information and hit the update button everything works fine. Even after the update, if I change some of the fields and hit the update button again it still works fine.
However if I select a different date from the drop down the page is posted back and the information for that date is loaded. Now if I try to click the update button nothing gets update. I tried setting a break point on the cmdUpdate_Click method but it never fires. If I leave some of the required fields blank though I do get the proper validation error messages. It should be noted that the information fields are inside an update panel with the drop down list selected index change event as a trigger.
I have tried place the button, and the drop down, inside the panel, outside the panel, setting different triggers, but nothing works. Through all the test I have done it comes down to that the update button works fine, unless an item is selected from the drop down list and the page is posted back. In this case the update button loses it's connection to its method. This seems odd because the cmdUpdate_Click method has a handles clause cmdUpdate_Click(...) Handles cmdUpdate.Click . I have tried adding a AddHandler call to almost every method I can think up (PageLoad,PageInit, PagePrerender,ddlClassDates_SelectedIndexChanged,etc.) but it still doesn't work.
Is there some weird bug in ASP.NET that a button loses its functionality when a page post back is initiated by another control and NOT by the button itself? Any help would be greatly appreciated because I have tried everything and nothing seems to work. I have my full code posted on another site and I won't repost it here due to it's length but if you would like to see it's here.
Thanks in advance for any help you can provide.
|
|
|
|
|
Hi,
I have a user defined configuration section which was taking values for Configuration section in App config file using ConfigurationManager.GetSection method.
But this method is retuning null now, but earlier before I checkin the code in Version Control, the same method was giving proper values.
After I checkin the code in Version Control, after some time it has started giving me problem that when I initialize the Doncfiration class using above method, I am getting null.
What could be te problem can anybody please help me, advise me. Any sort of help is greatly appreciated.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
There is something called debugging, have you ever tried it?
|
|
|
|
|
Hello,
We have a web application capturing the errors using the EventLog viewer on the machine it is hosted.
Does this method of capturing the error work well?
Any inputs on how to capture an apps errors?
Thanks!
|
|
|
|
|
What works best for you, or one situation, may not be the best for another. You could also use a custom event logger sucha Log4Net or EL Exception Handling Block
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I want that when i will enter the TextA i will see on the third table pic b (Winter)
and when i will enter TextB i will see on the third table pic c (Sunset)
Please help !!!
<%--When mouse will be over the text then i want the third table will show pic (Winter)--%>
<table width="100%" style="height:100px">
<tr>
<td onmouseover="showPic('Winter');" width="100%" style="height:100%">
ChangeToPicA -> The Text
</td>
</tr>
</table>
<%--When mouse will be over the text then i want the third table will show pic (Sunset)--%>
<table width="100%" style="height:100px">
<tr>
<td onmouseover="showPic('Sunset');" width="100%" style="height:100%">
ChangeToPicB -> The Text
</td>
</tr>
</table>
<%--The third table which need to change the pictures--%>
<table id="Sunset" class="pichide" width="100%" style="height:250px">
<tr>
<td width="100%" style="height:100%">
</td>
</tr>
</table>
JScript2.js
function showPic(id)
{
document.getElementById("Sunset").className = "c";
document.getElementById("Winter").className = "b";
document.getElementById(id).className = "picshow";
}
stylesheet.css
.c
{
background-image: url('Sunset.jpg');
background-repeat:no-repeat;
}
.b
{
background-image: url('Winter.jpg');
background-repeat:no-repeat;
}
.pichide
{
display: none;
}
.picshow
{
display: block;
border: 1px;
}
-- Modified Monday, August 1, 2011 9:18 AM
|
|
|
|
|
First, FORMAT your code snippets!!!
Creating tables for one cell is extreme overkill.
<span id="text1">Text A</span>
<span id="text2">Text B</span>
<img id="pic">
<style>
span, img
{
display:block;
}
</style>
<script>
$(document).ready(function()
{
$("#text1").hover(function()
{
$("#pic").attr("src", "Sunset.jpg");
});
$("#text2").hover(function()
{
$("#pic").attr("src", "Winter.jpg");
});
});
</script>
I know the language. I've read a book. - _Madmatt
modified on Monday, August 1, 2011 9:25 AM
|
|
|
|
|
i wrote the text which on mouseover it will make that changing
is in lines 9, 17
|
|
|
|
|
Hi,
I want to remove the extension of my asp.net webpages(I have a webapplication).
I've read some guidelines about the issue but I've found some simple ways to do it.
I've tried adding the following lines to my web.config file:
<rewrite>
<rules>
<clear />
<rule name="san aspx">
<!--Removes the .aspx extension for all pages.-->
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="{R:1}.aspx" />
</rule>
</rules>
</rewrite>
I have also tried to add this function to Application_BeginRequest in my global.asax file:
string curruntpath = Request.Path.ToLower();
curruntpath = curruntpath.Trim();
if (curruntpath.EndsWith(".aspx"))
{
string finalurl = curruntpath.Substring(curruntpath.Length - 5, 5);
HttpContext.Current.RewritePath(finalurl);
}
In the first case, when I type "www.site.com/page" I'm being redirected to "www.site.com/page.aspx"(which is my wanted page), but when I type "www.site.com/page.aspx" I want the shown URL to be "www.site.com/page", and it doesn't happen.
In the second attempt I just can't get any page when typing "www.site.com/page.aspx".
What should I do in order to solve it?
|
|
|
|
|
Im using vs 2008 ( asp.net / vb.net )
I've got grid with editable textboxes on the rows ( 1 textbox per column ).
On focus of a textbox I need to have a postback to retrieve a related value and display it on screen but after the postback it loses the focus.
Is there anything i can do to keep the focus?? tried multiple things online but nothing working yet
if i manual set the focus back to the control, then it will just fire the onfocus event - and therefore enter a loop.
anyone got any ideas
|
|
|
|
|
In this case I would definitely use AJAX rather than postbacks. It will solve you control focus issue and give a better user experience.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
thanks, but even using ajax it still creates a postback doesnt it. on focus of the control i need it to run some vb.net code ( server side code ). I have ajax set up and it still loads the page_load event so i presume it is still posting back, no ?
eiher way i dont have it working with ajax, maybe i have set some thing wrong
my code is
in pageload event
TextBox1Test.Attributes.Add("onfocus", "javascript:DoPostBack('TextBox1Test');")
Dim eventTarget As String = Request.Form("__EVENTTARGET")
If eventTarget IsNot Nothing Then
DayPostback(eventTarget) // server side code i need to run on focus
End If
javascript code
function DoPostBack(control) {
__doPostBack(control, "onFocus");
}
if i set the DayPostback method to manually set the focus, i get in a loop, if I loop the textbox loses focus after the event has been fired
modified on Monday, August 1, 2011 7:36 PM
|
|
|
|
|
You are not using AJAX, even in the slightest, most liberal definiation. AJAX is an out of band call, there is no postback involved. You should spend some time reading up on AJAX and its usage if you want to be doing web development.
<asp:TextBox runat='server' id='myText' onblur="AjaxCall();"/>
<span id='myResults'/>
function AjaxCall()
{
$.ajax({
type: "POST",
url: "foo.aspx/Bar",
data: "text=" + $("[id$='myText']").text(),
success: onSuccess
});
}
function onSuccess(data)
{
$("#myResults).text(data);
}
[WebMethod()]
public static string Bar(string text)
{
// DO something
return "something";
}
ALso make note of code snippets are properly formatted. Now you try.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hey!
I know it is a common question but I am too close and cant find solution. I have two Pages between A.aspx and B.aspx.
When you fill your name and surname on the textbox controls and then click on send button, redicted to B Page to say thank you for ordering but if you want to fill the form again for another ordering, click on back button from B Page to go back to previous page (A Page) and details (your name and surname) should remain on textbox controls. So you dont need to write your name and surname again. How to do this?
A.aspx:
<label>Name:</label> <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
<label>Surname:</label> <asp:TextBox ID="txtSurname" runat="server"></asp:TextBox>
<asp:Button ID="Send" runat="server" Text="Send Email" onclick="Send_Click" />
A.aspx.cs (C#):
protected void Send_Click(object sender, EventArgs e)
{
Response.Redirect("B.aspx");
}
B.aspx:
<p>Thank you for ordering. We will contact you very soon.</p>
<p>Do you want to order item again? Go back to A Page <asp:Button ID="btnBack" runat="server" Text="BACK" onclick="Send_Click" />
</div>
B.aspx.cs (C#):
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(Request.UrlReferrer.ToString());
}
Problem: when i clicked on back button, redicted to A Page and all the details (name and surname) are gone from textbox control. I want these details to remain, dont need to write it again.
Your help will be highly appreciated. Thanks for your time :-)
|
|
|
|
|
The web is stateless, you must persist any data is so manner if you wish to use it again. A common method is to pass an id, either via query string or session state, and have the page lookup the appropriate data in a datastore as required.
Also, you only need to format the code snippets you post, not the entire message. Please edit your post and correct the formatting
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I'd store that information in a cookie.
|
|
|
|
|
Hey
I want to change a image that is in one td
when my mouse moving over a onther element like (text, another td, tr, table)
example :
<table> // the image that needed to be switch with another image
<tr>
<td>
<b><img src="ABC.jpg"/></b>
</td>
</tr>
</table>
<table>
<tr>
<td>
<b>TEXT</b>
</td>
</tr>
</table> // here i want to creat a mouseover/out option
please help
thank's
|
|
|
|
|
Hi,
using JQury can do the trick. First assign id to your table/image elements, for example
<table id="table1">
<tr>
<td>
<b><img id="img1" src="ABC.jpg"/></b>
</td>
</tr>
</table>
<table id="table2">
<tr>
<td>
<b>TEXT</b>
</td>
</tr>
</table>
Now use jquery
$("#table2").mouseover(function() {
$("#img1").attr("src","xyz.jpg");
}).mouseout(function(){
$("#img1").attr("src","abc.jpg");
});
Thus mouseover event triggers each time you hover table2 and change the image to xyz.jpg
you will get similar concept from here[^]
Hope this will help
|
|
|
|
|
I have JScript1.js
not JQury
I using Visual Basic 2008
Please help thank's
|
|
|
|
|