Click here to Skip to main content
15,900,714 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionhow to designe a web template Pin
sivabulli15-Dec-06 1:27
sivabulli15-Dec-06 1:27 
AnswerRe: how to designe a web template Pin
Frank Kerrigan15-Dec-06 3:47
Frank Kerrigan15-Dec-06 3:47 
QuestionMoving From 2003 to 2005 Pin
mahammadhusen15-Dec-06 1:23
mahammadhusen15-Dec-06 1:23 
AnswerRe: Moving From 2003 to 2005 Pin
Frank Kerrigan15-Dec-06 3:38
Frank Kerrigan15-Dec-06 3:38 
Questionblog Pin
micutzu15-Dec-06 0:59
micutzu15-Dec-06 0:59 
AnswerRe: blog Pin
Colin Angus Mackay15-Dec-06 3:37
Colin Angus Mackay15-Dec-06 3:37 
GeneralRe: blog Pin
micutzu15-Dec-06 3:50
micutzu15-Dec-06 3:50 
QuestionFroblem regarding Ajax Pin
yogesh m15-Dec-06 0:20
yogesh m15-Dec-06 0:20 
HI problem regarding ajax ..
Inside ajax Method I use code to bind data ..

Code is as follow

[Ajax.Method]
public string GetCity(int stateId )
{
MenuDirectory.BLL .MasterData objMaster=new MenuDirectory.BLL.MasterData ();
DataSet dsCity=objMaster.GetCitiesForState(stateId);
DataRow dr=dsCity.Tables[0].NewRow();
dr["cityId"]=0;
dr["cityName"]="Select City";
dsCity.Tables[0].Rows.InsertAt(dr,0);
dropDownResCity.DataSource=dsCity.Tables[0];
dropDownResCity.DataTextField="cityName";
dropDownResCity.DataValueField="cityId";
dropDownResCity.DataBind();
HtmlTextWriter testWriter = null;
dropDownResCity.RenderControl(testWriter);
return testWriter.ToString();
}
I got error on line "dropDownResCity.RenderControl(testWriter);" As
Control 'dropDownRestCity' of type DropDownList must be place inside form tag with run at = "Server" where and my control is inside form tag

The html for AspX as follow
<HTML>
<HEAD>
<title>AjaxCall</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript">
function CallFillCity(objCity)
{
//alert(obj.value);
var obj = document.getElementById("dllCity");
//alert(obj.innerHTML);
//alert(objCity.value);
CityHtml = My.Page.GetCity(objCity.value);
//alert(CityHtml.value);
obj.innerHTML = CityHtml.value;
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">

<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td id="dllState1">
<p style="MARGIN-TOP: 2px">&nbsp;&nbsp;<asp:dropdownlist id="dropDownResState" CssClass="txtType" Runat="server" AutoPostBack="False"></asp:dropdownlist></p>
</td>
<td id="dllCity">
<p style="MARGIN-TOP: 2px"><asp:dropdownlist id="dropDownResCity" tabIndex="1" CssClass="txtType" Runat="server" AutoPostBack="False"></asp:dropdownlist></p>
</td>
</tr>
</table>


</form>
</body>
</HTML>


Any know solution ...


yogesh M
AnswerRe: Froblem regarding Ajax Pin
GaryWoodfine 15-Dec-06 0:53
professionalGaryWoodfine 15-Dec-06 0:53 
GeneralRe: Froblem regarding Ajax Pin
yogesh m15-Dec-06 1:00
yogesh m15-Dec-06 1:00 
QuestionMultiline TextBox Pin
pavanabollineni15-Dec-06 0:16
pavanabollineni15-Dec-06 0:16 
AnswerRe: Multiline TextBox Pin
Frank Kerrigan15-Dec-06 0:19
Frank Kerrigan15-Dec-06 0:19 
GeneralRe: Multiline TextBox Pin
pavanabollineni15-Dec-06 2:10
pavanabollineni15-Dec-06 2:10 
AnswerRe: Multiline TextBox Pin
GaryWoodfine 15-Dec-06 0:49
professionalGaryWoodfine 15-Dec-06 0:49 
GeneralRe: Multiline TextBox Pin
pavanabollineni15-Dec-06 1:57
pavanabollineni15-Dec-06 1:57 
QuestionDataGrid in 1.1 Pin
Uma Kameswari15-Dec-06 0:09
Uma Kameswari15-Dec-06 0:09 
AnswerRe: DataGrid in 1.1 Pin
Frank Kerrigan15-Dec-06 0:17
Frank Kerrigan15-Dec-06 0:17 
GeneralRe: DataGrid in 1.1 Pin
Uma Kameswari15-Dec-06 0:23
Uma Kameswari15-Dec-06 0:23 
GeneralRe: DataGrid in 1.1 Pin
Frank Kerrigan15-Dec-06 3:41
Frank Kerrigan15-Dec-06 3:41 
QuestionRead PST file Pin
aaraaayen14-Dec-06 23:45
aaraaayen14-Dec-06 23:45 
AnswerRe: Read PST file Pin
Frank Kerrigan15-Dec-06 0:08
Frank Kerrigan15-Dec-06 0:08 
QuestionIn Cursor Set and Execute Statement Related Query Pin
param thaker14-Dec-06 21:37
param thaker14-Dec-06 21:37 
AnswerRe: In Cursor Set and Execute Statement Related Query Pin
Frank Kerrigan15-Dec-06 0:06
Frank Kerrigan15-Dec-06 0:06 
Question"a property can not be set by ...." problemm!!! Pin
amin_behzadi14-Dec-06 21:20
professionalamin_behzadi14-Dec-06 21:20 
AnswerRe: "a property can not be set by ...." problemm!!! Pin
Frank Kerrigan15-Dec-06 0:00
Frank Kerrigan15-Dec-06 0:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.