|
Brady Kelly wrote: I don't want to simply have a long, scrolling page showing all products etc.
You mean like how codeproject lets the user set the number of threads to show in one page?
led mike
|
|
|
|
|
Sort of, but it's a consumer site, so I'm not giving the users too much choice yet - it's a very, very low budget site for a friend. The text side needs some explanation: If I have a long piece of text, I want to break it up into pages, just as a repeating control would do for separate items. I'm even willing to break the text myself....Oh, Pages of text in a table and a paging DataList. Thanks, just talking about it has been a help.
|
|
|
|
|
hi,
i have created 2 drop down lists and made a web service.
// This is Web servie, which is having the 2 web methods.
// a GetCountries
//b. GetStates
using System;<br />
using System.Web;<br />
using System.Collections;<br />
using System.Collections.Generic;<br />
using System.Web.Services;<br />
using System.Web.Services.Protocols;<br />
using System.Xml.Serialization;<br />
<br />
using System.Collections.Specialized;<br />
using AjaxControlToolkit;<br />
<br />
<br />
[WebService(Namespace = "http://tempuri.org/")]<br />
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]<br />
[System.Web.Script.Services.ScriptService]<br />
public class TerritoriesService : System.Web.Services.WebService<br />
{<br />
<br />
public TerritoriesService()<br />
{<br />
<br />
}<br />
<br />
<br />
<br />
[WebMethod]<br />
public string HelloWorld()<br />
{<br />
return "Hello World";<br />
}<br />
<br />
<br />
[WebMethod]<br />
public CascadingDropDownNameValue[] GetCountries(string knownCategoryValues, string category)<br />
{<br />
UNIVERSAL.CommonBLL.Country.Country oCountry = UNIVERSAL.CommonBLL.Country.CountryFactory.GetInstance();<br />
UNIVERSAL.CommonBLL.Country.CountryCollection objCountryCollection = (UNIVERSAL.CommonBLL.Country.CountryCollection)oCountry.GetAll();<br />
List<CascadingDropDownNameValue> values = new List<CascadingDropDownNameValue>();<br />
<br />
foreach (UNIVERSAL.CommonBLL.Country.Country objCountry in objCountryCollection)<br />
{<br />
values.Add(new CascadingDropDownNameValue(objCountry.Name,objCountry.PKID.ToString()));<br />
}<br />
<br />
return values.ToArray();<br />
<br />
<br />
}<br />
<br />
[WebMethod]<br />
public CascadingDropDownNameValue[] GetStates(string knownCategoryValues, string Category)<br />
{<br />
StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);<br />
int CountryID;<br />
<br />
if (!kv.ContainsKey("Country") || !Int32.TryParse(kv["Country"], out CountryID))<br />
{<br />
return null;<br />
}<br />
<br />
UNIVERSAL.CommonBLL.States.States oState = UNIVERSAL.CommonBLL.States.StatesFactory.GetInstance();<br />
UNIVERSAL.CommonBLL.States.StatesCollection objStateCollection = (UNIVERSAL.CommonBLL.States.StatesCollection)oState.GetAll(CountryID.ToString());<br />
List<CascadingDropDownNameValue> values = new List<CascadingDropDownNameValue>();<br />
<br />
foreach (UNIVERSAL.CommonBLL.States.States objState in objStateCollection)<br />
{<br />
values.Add(new CascadingDropDownNameValue(objState.Name, objState.PKID.ToString()));<br />
}<br />
return values.ToArray();<br />
}<br />
}<br />
My aspx page codeing is belo
<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:DropDownList ID="ddlCountry" runat="server">
</asp:DropDownList></td>
<td style="width: 100px">
<cc1:CascadingDropDown ID="CascadingDropDown1" runat="server"
TargetControlID="ddlCountry"
Category ="Country"
PromptText="PleaseSelectCountry"
LoadingText="Please Wait..."
ServiceMethod="GetCountries"
ServicePath="TerritoriesService.asmx" />
</td>
</tr>
<tr>
<td style="width: 100px">
States</td>
<td style="width: 100px">
<asp:DropDownList ID="ddlStates" runat="server">
</asp:DropDownList></td>
<td style="width: 100px">
<cc1:CascadingDropDown ID="CascadingDropDown2" runat="server"
Category ="Country"
TargetControlID="ddlStates"
ParentControlID="ddlCountry"
PromptText="Please Select State"
LoadingText="Please Wait..."
ServiceMethod="GetStates"
ServicePath="TerritoriesService.asmx" />
It works well for first dropdown list but in second drop down list it give the error messaage Method Erro 500after the prompt message of CasecadingDropdown
The web service is working fine, but in the page its not giveing result.
Pleaes help.
modified on Thursday, September 11, 2008 10:11 AM
|
|
|
|
|
HI,
How can i capture windows Download dialog box events?? Please help in this regard.
Thanks in advance
|
|
|
|
|
I have a problem to disable a browser back button of a particular child page(Not all child pages of a master page).
No problem when i use in a separate page. I may use history.forward script to onload property of a body tag in a page.
but now i m using master page. that's why i dont know to implement the rule. Could you help me regarding this.
Advance thanks
G Nathan
|
|
|
|
|
Hi,
I created dynamic TextBox
Dim Txtdynamic As TextBox = New TextBox
Txtdynamic.ID = "id1"
c_placeholder.Controls.Add(Txtdynamic)
which used in
<asp:placeholder runat="server" id="c_placeholder" xmlns:asp="#unknown">
My question is how do I restrict this text box to take only numbers.
I got some hint like
<asp:textbox id="TextBox1" runat="server" onkeypress="return increment(event)">
but problem is onkeypress event not supported in ASP.Net (in my little knowledge) and I dont use <asp:textbox> control
Thanks in Advance
|
|
|
|
|
u can validate once the user has typed the value and tabs / focus out of the textbox using onblur event. write a function in javascript to which u pass the textbox and fetch the value inside, validate and return if it contains other than numeric values.
u can add this fn using attributes.add method to the textbox.
sriranga
|
|
|
|
|
function NumberOnly()<br />
{<br />
<br />
if ((window.event.keyCode >= 48 && window.event.keyCode <=57)) <br />
return true;<br />
else<br />
<br />
return false;<br />
<br />
}
And use
<asp:textbox id="txtNo" runat="server" width="170px" onkeypress="javascript:return NumberOnly()></asp:TextBox></code></pre>
<div class=" forumsig=">cheers,<br mode=" hold=" />Abhijit<br mode=" 2=" color=" xmlns:asp="#unknown"></asp:textbox>
|
|
|
|
|
What about backspace, delete, arrow keys, tab and all the other control keys that you should allow?
|
|
|
|
|
J4amieC wrote: What about backspace, delete, arrow keys, tab and all the other control keys that you should allow?
Sure, but dude, you didn't even give the codes!
led mike
|
|
|
|
|
J4amieC wrote: What about backspace, delete, arrow keys, tab and all the other control keys that you should allow?
Strictly speaking, the subject does say "restrict text box to take only numbers". Don't introduce feature creep at this late stage.
|
|
|
|
|
Thanks for your help, but as i wrote in my question i did not use <asp:textbox xmlns:asp="#unknown">.
The link below solve my problem.
http://www.codeproject.com/KB/webforms/NumericValidator.aspx
Thanks
|
|
|
|
|
how to find reference count for an object in unmanaged code and to desyroy perticular object in unmanaged code?
hi
|
|
|
|
|
hi,
Am doing web application using socket to connect to particular IPAddress and to receive packets,am successfully receiving the packet but i can't display on web page.pls help
|
|
|
|
|
ramesh1482 wrote: Am doing web application using socket to connect to particular IPAddress and to receive packets
Do you really know what a web application means?
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hello,
I have an ASP.NET application. We are using telerik’s rad control to upload files. I could like to restrict the total file size to 15 MB. Could anyone help me?
Appreciate your help.
Best regards,
Ashish Basran
- ashish
|
|
|
|
|
Ask for the help from telerik support.
Nana
|
|
|
|
|
Hi Reader,
In below the Method(CreateGrid) i am passing the data table(newDT1) which has 50 rows.
protected void lnkMore_Click(object sender, EventArgs e)
{
CreateGrid(newDT1);
}
protected void CreateGrid(DataTable dt)
{
--
---
---
--
gridview.datasource=dt;
}
Here i want to pass the first 10 rows only when i click the link button.Then next 10 rows should be passed and on the 2nd click.so i want to pass the 10 rows upto 5 times when i click the link.
I am not expert in asp.net. so please advice me.
|
|
|
|
|
use paging it in the data grid properties
The Web Developer Beirout-Lebanon
|
|
|
|
|
The requirement is when i click a link "More.." i need to display the records(10 rows) in the gridview. Then the next click next set of 10 records should be displayed.Then the similar way.
Can you reply?
Thanks for you advising.
|
|
|
|
|
try paging by code with a loop
The Web Developer Beirout-Lebanon
|
|
|
|
|
Can you not just set the automatic paging on the gridview?
|
|
|
|
|
Hi..
I am making a comparison site. I am crawling a site & getting 1000 of records which i m displaying in grid. Bt as there r 1000 of records, it takes 2 long to load. I want that as soon as it gets few records from a site, it shld display them nd den continue searching further as in the following link
"http://journeysasta.com/flights/flightSearch.htm?direction=RoundTrip&originCity=DEL&destCity=BOM&departDate=12%2F09%2F2008&returnDate=12%2F09%2F2008&cabinType=Economy&adultSelect=1&childSelect=0&infantSelect=0&Submit=&processCounter=0"
How to do this? Can it b done using ajax or something else.. Plz suggest something...
|
|
|
|
|
I have a pop up page and on it there is a button im using to save data, but after saving i want to refresh the main page(which is working fine) but after that i want to close the pop up page as well(which aint happening-the problem). My problem is if i have both of these statements/functions under one control only the first one works. im running these lines from c# under the click event of the save button.
Does anyone know what the problem is.
string scriptString2 = " window.opener.document.forms(0).submit(); ";
if (!Page.ClientScript.IsClientScriptBlockRegistered(scriptString2))
{
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "submitScript", scriptString2);
}
string scriptString = " window.close(); ";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "submitScript", scriptString);
|
|
|
|
|
Submit both the scripts at once. You can concatenate the secound script to scriptString2.
|
|
|
|