Not getting value in javascript - asp.net

I have a datalist and in itemdatabound iam calling javascript and passing one argument.But iam not getting that argument in js.
<asp:Button ID="btnUpload" runat="server" cssClass="button1" Text="Upload" >
<asp:DataList ID="dlView" runat="server" >
<ItemTemplate>
<tr>
<td>
<asp:Image ID="imgPlan" runat="server" ImageUrl='<%#GetImage(Eval("ImageName")) %>' />
</td>
</tr>
<tr>
<td>
<asp:LinkButton ID="lnkChangeLogo" runat="server" Text="ChangeLogo" OnClientClick="javascript:showLayerUpLoad();return false;">
</asp:LinkButton>
<br />
<asp:LinkButton ID="lnkRemoveLogo" runat="server" Text="RemoveLogo" OnClientClick="javascript:ConfirmChoice();return false;"/>
<asp:TextBox ID="txtImage" runat="server" Text='<%#Eval("ImageName") %>'></asp:TextBox>
<asp:HiddenField ID="hdnImage" runat="server" Value='<%#Eval("ImageName")%>' />
</td>
</tr>
</ItemTemplate>
</asp:DataList>
In itemdatabound i have written following code
Protected Sub dlView_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) Handles dlView.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or _
e.Item.ItemType = ListItemType.AlternatingItem Then
Dim txtImage As TextBox = DirectCast(e.Item.FindControl("txtImage"), TextBox)
Dim s As String = txtImage.Text
btnUpload.OnClientClick = String.Format("javascript:UploadImages('{0}')", s)
End If
End Sub
Following is my javascript fn
function UploadImages(str)
{
alert(str);
}
Problem is in itemdatabound iam getting value in String.Format("javascript:UploadImages('{0}')", s)
but when clicking on btnUpload ,control is moving to UploadImages in js,but no value in str.
What may be the reason for that?Can anybody help please?
Following is html result
<link href="../CSS/PopupDiv.css" rel="stylesheet" type="text/css" /></head>
<div id="shadow" class="opaqueLayer"> </div>
<div id="question" class="questionLayer">
<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#F1ECDE">
<tr style="height:17">
<td style="background:url(../App_Images/bg/contentlefttop.gif)" width="26" height="17"> </td>
<td style="background:url(../App_Images/bg/contenttop.gif)"> </td>
<td style="background:url(../App_Images/bg/contentrighttop.gif)" width="26" height="17"> </td>
</tr>
<tr>
<td style="background:url(../App_Images/bg/contentleft.gif)" width="26"> </td>
<td bgcolor="#FFFFFF">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td style="text-align:justify; line-height:18px">
<img src="../App_Images/loading.gif" alt="Loading..."/>
</td>
</tr>
<tr>
<td>
Please Wait While the Values Load...
</td>
</tr>
</table>
</td>
<td style="background:url(../App_Images/bg/contentright.gif)" width="26"> </td>
</tr>
<tr style="height:17">
<td style="background:url(../App_Images/bg/contentleftbottom.gif)" width="26" height="17"> </td>
<td style="background:url(../App_Images/bg/contentbottom.gif)"> </td>
<td style="background:url(../App_Images/bg/contentrightbottom.gif)" width="26" height="17"> </td>
</tr>
</table>
</div>
<div id="questionUpLoad" class="questionLayer">
<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#F1ECDE">
<tr style="height:17">
<td style="background:url(../App_Images/bg/contentlefttop.gif)" width="26" height="17"> </td>
<td style="background:url(../App_Images/bg/contenttop.gif)"> </td>
<td style="background:url(../App_Images/bg/contentrighttop.gif)" width="26" height="17"> </td>
</tr>
<tr>
<td style="background:url(../App_Images/bg/contentleft.gif)" width="26"> </td>
<td bgcolor="#FFFFFF">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td style="text-align:justify; line-height:18px">
<strong> File Name:</strong><br />
<span id="spnUpload">
<input type="file" id="flUpload" />
</span>
</td>
</tr>
<tr>
<td>
<input type="submit" name="btnUpload" value="Upload" onclick="UploadImages('');" id="btnUpload" class="button1" />
<input type="submit" name="btnCancel" value="Cancel" onclick="javascript:hideLayerUpLoad();return false;" id="btnCancel" class="button1" />
</td>
</tr>
</table>
</td>
<td style="background:url(../App_Images/bg/contentright.gif)" width="26"> </td>
</tr>
<tr style="height:17">
<td style="background:url(../App_Images/bg/contentleftbottom.gif)" width="26" height="17"> </td>
<td style="background:url(../App_Images/bg/contentbottom.gif)"> </td>
<td style="background:url(../App_Images/bg/contentrightbottom.gif)" width="26" height="17"> </td>
</tr>
</table>
</div>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="6" colspan="2" align="left" style="padding-right:5px; width: 125px;" >
<table id="dlView" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td>
<tr>
<td>
<img id="dlView_ctl00_imgPlan" src="../SiteImages/vidhya/40/1/ThumbNails/abc.jpg" style="border-width:0px;" />
</td>
</tr>
<tr>
<td>
<a onclick="javascript:showLayerUpLoad();return false;" id="dlView_ctl00_lnkChangeLogo" href="javascript:__doPostBack('dlView$ctl00$lnkChangeLogo','')">ChangeLogo</a>
<br />
<a onclick="javascript:ConfirmChoice();return false;" id="dlView_ctl00_lnkRemoveLogo" href="javascript:__doPostBack('dlView$ctl00$lnkRemoveLogo','')">RemoveLogo</a>
<input name="dlView$ctl00$txtImage" type="text" value="abc.jpg" id="dlView_ctl00_txtImage" />
<input type="hidden" name="dlView$ctl00$hdnImage" id="dlView_ctl00_hdnImage" value="abc.jpg" />
</td>
</tr>
</td>
</tr><tr>
<td>
<tr>
<td>
<img id="dlView_ctl01_imgPlan" src="../SiteImages/vidhya/40/1/ThumbNails/qwe.DIhJfEPC" style="border-width:0px;" />
</td>
</tr>
<tr>
<td>
<a onclick="javascript:showLayerUpLoad();return false;" id="dlView_ctl01_lnkChangeLogo" href="javascript:__doPostBack('dlView$ctl01$lnkChangeLogo','')">ChangeLogo</a>
<br />
<a onclick="javascript:ConfirmChoice();return false;" id="dlView_ctl01_lnkRemoveLogo" href="javascript:__doPostBack('dlView$ctl01$lnkRemoveLogo','')">RemoveLogo</a>
<input name="dlView$ctl01$txtImage" type="text" value="qwe.DIhJfEPC" id="dlView_ctl01_txtImage" />
<input type="hidden" name="dlView$ctl01$hdnImage" id="dlView_ctl01_hdnImage" value="qwe.DIhJfEPC" />
</td>
</tr>
</td>
</tr><tr>
<td>
<tr>
<td>
<img id="dlView_ctl02_imgPlan" src="../SiteImages/vidhya/40/1/ThumbNails/asd.jpg" style="border-width:0px;" />
</td>
</tr>
<tr>
<td>
<a onclick="javascript:showLayerUpLoad();return false;" id="dlView_ctl02_lnkChangeLogo" href="javascript:__doPostBack('dlView$ctl02$lnkChangeLogo','')">ChangeLogo</a>
<br />
<a onclick="javascript:ConfirmChoice();return false;" id="dlView_ctl02_lnkRemoveLogo" href="javascript:__doPostBack('dlView$ctl02$lnkRemoveLogo','')">RemoveLogo</a>
<input name="dlView$ctl02$txtImage" type="text" value="asd.jpg" id="dlView_ctl02_txtImage" />
<input type="hidden" name="dlView$ctl02$hdnImage" id="dlView_ctl02_hdnImage" value="asd.jpg" />
</td>
</tr>
</td>
</tr><tr>
<td>
<tr>
<td>
<img id="dlView_ctl03_imgPlan" src="../SiteImages/vidhya/40/1/ThumbNails/vini.jpg" style="border-width:0px;" />
</td>
</tr>
<tr>
<td>
<a onclick="javascript:showLayerUpLoad();return false;" id="dlView_ctl03_lnkChangeLogo" href="javascript:__doPostBack('dlView$ctl03$lnkChangeLogo','')">ChangeLogo</a>
<br />
<a onclick="javascript:ConfirmChoice();return false;" id="dlView_ctl03_lnkRemoveLogo" href="javascript:__doPostBack('dlView$ctl03$lnkRemoveLogo','')">RemoveLogo</a>
<input name="dlView$ctl03$txtImage" type="text" value="vini.jpg" id="dlView_ctl03_txtImage" />
<input type="hidden" name="dlView$ctl03$hdnImage" id="dlView_ctl03_hdnImage" value="vini.jpg" />
</td>
</tr>
</td>
</tr><tr>
<td>
<tr>
<td>
<img id="dlView_ctl04_imgPlan" src="../SiteImages/vidhya/40/1/ThumbNails/" style="border-width:0px;" />
</td>
</tr>
<tr>
<td>
<a onclick="javascript:showLayerUpLoad();return false;" id="dlView_ctl04_lnkChangeLogo" href="javascript:__doPostBack('dlView$ctl04$lnkChangeLogo','')">ChangeLogo</a>
<br />
<a onclick="javascript:ConfirmChoice();return false;" id="dlView_ctl04_lnkRemoveLogo" href="javascript:__doPostBack('dlView$ctl04$lnkRemoveLogo','')">RemoveLogo</a>
<input name="dlView$ctl04$txtImage" type="text" id="dlView_ctl04_txtImage" />
<input type="hidden" name="dlView$ctl04$hdnImage" id="dlView_ctl04_hdnImage" />
</td>
</tr>
</td>
</tr><tr>
<td>
<tr>
<td>
<img id="dlView_ctl05_imgPlan" src="../SiteImages/vidhya/40/1/ThumbNails/adf.jpg" style="border-width:0px;" />
</td>
</tr>
<tr>
<td>
<a onclick="javascript:showLayerUpLoad();return false;" id="dlView_ctl05_lnkChangeLogo" href="javascript:__doPostBack('dlView$ctl05$lnkChangeLogo','')">ChangeLogo</a>
<br />
<a onclick="javascript:ConfirmChoice();return false;" id="dlView_ctl05_lnkRemoveLogo" href="javascript:__doPostBack('dlView$ctl05$lnkRemoveLogo','')">RemoveLogo</a>
<input name="dlView$ctl05$txtImage" type="text" value="adf.jpg" id="dlView_ctl05_txtImage" />
<input type="hidden" name="dlView$ctl05$hdnImage" id="dlView_ctl05_hdnImage" value="adf.jpg" />
</td>
</tr>
</td>
</tr><tr>
<td>
<tr>
<td>
<img id="dlView_ctl06_imgPlan" src="../SiteImages/vidhya/40/1/ThumbNails/" style="border-width:0px;" />
</td>
</tr>
<tr>
<td>
<a onclick="javascript:showLayerUpLoad();return false;" id="dlView_ctl06_lnkChangeLogo" href="javascript:__doPostBack('dlView$ctl06$lnkChangeLogo','')">ChangeLogo</a>
<br />
<a onclick="javascript:ConfirmChoice();return false;" id="dlView_ctl06_lnkRemoveLogo" href="javascript:__doPostBack('dlView$ctl06$lnkRemoveLogo','')">RemoveLogo</a>
<input name="dlView$ctl06$txtImage" type="text" id="dlView_ctl06_txtImage" />
<input type="hidden" name="dlView$ctl06$hdnImage" id="dlView_ctl06_hdnImage" />
</td>
</tr>
</td>
</tr><tr>
<td>
<tr>
<td>
<img id="dlView_ctl07_imgPlan" src="../SiteImages/vidhya/40/1/ThumbNails/" style="border-width:0px;" />
</td>
</tr>
<tr>
<td>
<a onclick="javascript:showLayerUpLoad();return false;" id="dlView_ctl07_lnkChangeLogo" href="javascript:__doPostBack('dlView$ctl07$lnkChangeLogo','')">ChangeLogo</a>
<br />
<a onclick="javascript:ConfirmChoice();return false;" id="dlView_ctl07_lnkRemoveLogo" href="javascript:__doPostBack('dlView$ctl07$lnkRemoveLogo','')">RemoveLogo</a>
<input name="dlView$ctl07$txtImage" type="text" id="dlView_ctl07_txtImage" />
<input type="hidden" name="dlView$ctl07$hdnImage" id="dlView_ctl07_hdnImage" />
</td>
</tr>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><strong style="color:#ADADAD">URL : </strong><a id="lnkUrl" target="_blank">
<span id="lblUrl"></span>
</a></td>
</tr>
</table>
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWIwKerOHHCALt3oXMAwKQ9M/rBQLf8c7OBALF9uAaAtzO1PIKAt/2m70CAvrasL4HAuDf6ooCAtzOwPcIAt/2h0IC5v+70Q0CzITOxQ8C3M6spAcC3/bDxwYCgemdpAkC5+3XyA0C3M6YqQUC3/avzAQClcS6vQkC+8jMiQUC3M6EhgMC3/bL0AoCsK2c6A4ClrLWtAkC3M7wigEC3/b3hwQCnNKn+wQCgte57wYC3M7ctw8C3/bz2g4C3/GapA8CxfbUyAMC3M6I7wgC3/bf3ww=" />
</div></form>
</body>
</html>

For the OnClientClick property on button server controls (ImageButton, LinkButton, Button) you do not use the javascript: prefix. So try to remove all your javascript: stuff and see if it works.
Ignored what I said above... LinkButton is a special case. :P
I now have a closer look at your code and the HTML output. From what I can see, there are some issues in your code:
You are dynamically changing the OnClientClick property of the btnUpload server control which sits outside the DataList. Which means the OnClientClick for the btnUpload button will change each time an item is bound to the list and the result is, if it works, the last ImageName in your datasource is passed to the btnUpload's onclick attribute in the output HTML.
The Eval("ImageName") seems only work when calling it from the GetImage() function for imgPlan. I am not too sure why this is happening. And because of this, the Text and Value of txtImage and hdnImage are not populated and this is why you did not get the value in the js.
Please review your code and let us know any results. :)

btnUpload it outside the item template for your datalast, so OnClientClick is rewritten for every item during the ItemDataBound handler. apparently for the last item in your datasource, ImageName is empty/null. move btnUpload into the item template and see if that improves the situation.

Related

Radio button grouping not working in repeater control

This is what i am trying in aspx page
group name is not same in html code how can i manage it pls suggest
i am trying with the radio button in side a repeater control
<asp:Repeater ID="rptGoogleCalenderList" runat="server">
<ItemTemplate>
<tr>
<td style="width: 10px;">
<asp:RadioButton ID="radiocalenderList" CssClass="grpGoogleCalenderList" value="grpGoogleCalenderList" GroupName="GoogleCalenderList" runat="server" />
<%--<input id="" type="radio" name="" />--%>
</td>
<td colspan="3">
<asp:HiddenField ID="hfCalenderId" runat="server" Value='<%#Eval("CalenderId") %>' />
<%#Eval("CalenderName") %></td>
</tr>
</ItemTemplate>
</asp:Repeater>
this is what HTML generated for the above code
<tbody><tr>
<td style="width: 10px;">
<span class="grpGoogleCalenderList"><input id="Content_rptGoogleCalenderList_radiocalenderList_0" type="radio" name="ctl00$Content$rptGoogleCalenderList$ctl00$GoogleCalenderList" value="grpGoogleCalenderList"></span>
</td>
<td colspan="3">
<input type="hidden" name="ctl00$Content$rptGoogleCalenderList$ctl00$hfCalenderId" id="Content_rptGoogleCalenderList_hfCalenderId_0" value="omiai468mpv3ghgojvsgqnsiak#group.calendar.google.com">
my ct calender</td>
</tr>
<tr>
<td style="width: 10px;">
<span class="grpGoogleCalenderList"><input id="Content_rptGoogleCalenderList_radiocalenderList_1" type="radio" name="ctl00$Content$rptGoogleCalenderList$ctl01$GoogleCalenderList" value="grpGoogleCalenderList"></span>
</td>
<td colspan="3">
<input type="hidden" name="ctl00$Content$rptGoogleCalenderList$ctl01$hfCalenderId" id="Content_rptGoogleCalenderList_hfCalenderId_1" value="">
</td>
</tr>
<tr>
<td style="width: 10px;">
<span class="grpGoogleCalenderList"><input id="Content_rptGoogleCalenderList_radiocalenderList_2" type="radio" name="ctl00$Content$rptGoogleCalenderList$ctl02$GoogleCalenderList" value="grpGoogleCalenderList"></span>
</td>
<td colspan="3">
<input type="hidden" name="ctl00$Content$rptGoogleCalenderList$ctl02$hfCalenderId" id="Content_rptGoogleCalenderList_hfCalenderId_2" value="#contacts#group.v.calendar.google.com">
Birthdays</td>
</tr>
<tr>
<td style="width: 10px;">
<span class="grpGoogleCalenderList"><input id="Content_rptGoogleCalenderList_radiocalenderList_3" type="radio" name="ctl00$Content$rptGoogleCalenderList$ctl03$GoogleCalenderList" value="grpGoogleCalenderList"></span>
</td>
<td colspan="3">
<input type="hidden" name="ctl00$Content$rptGoogleCalenderList$ctl03$hfCalenderId" id="Content_rptGoogleCalenderList_hfCalenderId_3" value="en.indian#holiday#group.v.calendar.google.com">
Holidays in India</td>
</tr>
</tbody></table>
Use HTML radio button instead of ASP Radio button:-
<input type="radio" name="GoogleCalenderList" />
Unfortunately, asp radio button don't work inside repeater, so you need to do a work around either at client side or by using HTML control.

on signup buttonclick of loginpopup I want to show signup popup and also want to disable login popup but my code is not working as it should have to

<div class="body1">
<div class="main">
<!-- header -->
<header>
<h1></h1>
<div class="wrapper">
<ul id="icons">
<li><asp:ImageButton runat="server" ImageUrl="images/lgn.png" ID="btnimg" CssClass="image" /></li>
</ul>
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
TargetControlID="btnimg" PopupControlID="Panel1" CancelControlID="Button3"
BackgroundCssClass="modalBackground">
</asp:ModalPopupExtender >
<asp:panel id="Panel1" CssClass="popup" runat="server">
<div class="popup">
<div id="PopupHeader" style="height:55px;background-color:#f6f6f6;border-radius:10px;width:348px;font-size:2.7em; "> <font style="margin:30px 0px 0px 20px;vertical-align:middle;color:#87a310;line-height:1.2em; font-size:37px; font-family:Calibri;"> Login </div>
<div class="PopupBody">
<table width="350px" style="vertical-align:middle;text-align:center;">
<tr>
<td style="width:43.5px"> </td>
<td style="width:131.25px">
<asp:Label ID="Label1" runat="server" Text="User Name: "></asp:Label>
</td>
<td style="width:131.25px">
<asp:TextBox ID="txtUserName" runat="server" Height="20px" style="border-radius:8px;"
ValidationGroup="btn"></asp:TextBox>
<asp:TextBoxWatermarkExtender ID="txtUserName_TextBoxWatermarkExtender"
runat="server" Enabled="True" TargetControlID="txtUserName"
WatermarkText="User Name">
</asp:TextBoxWatermarkExtender>
</td>
<td style="width:43.5px"> </td>
</tr>
<tr>
<td style="width:43.5px"> </td>
<td style="width:131.25px"> </td>
<td style="width:131.25px"> </td>
<td style="width:43.5px"> </td>
</tr>
<tr>
<td style="width:43.5px"> </td>
<td style="width:131.25px">
<asp:Label ID="Label2" runat="server" Text="Password: " ></asp:Label>
</td>
<td style="width:131.25px">
<asp:TextBox ID="txtPassword" runat="server" Height="20px" style="border-radius:8px;"
ValidationGroup="btn"></asp:TextBox>
<asp:TextBoxWatermarkExtender ID="txtPassword_TextBoxWatermarkExtender"
runat="server" Enabled="True" TargetControlID="txtPassword"
WatermarkText="Password">
</asp:TextBoxWatermarkExtender>
</td>
<td style="width:43.5px"> </td>
</tr>
<tr >
<td style="width:43.5px"> </td>
<td style="width:131.25px"> </td>
<td style="width:131.25px"> </td>
<td style="width:43.5px"> </td>
</tr>
<tr>
<td style="width:43.5px"> </td>
<td colspan="2">
<asp:Label ID="Label3" runat="server" Text="Invalid User Name Or Password."
Visible="False"></asp:Label>
</td>
<td style="width:43.5px"> </td>
</tr>
<tr>
<td style="width: 43.5px">
</td>
<td style="width: 131.25px">
<asp:Button ID="Button2" runat="server" CssClass="button" Text="Login" OnClick="Button2_Click" />
</td>
<td style="width: 131.25px">
<asp:Button ID="Button1" runat="server" CssClass="button" Text="Cancle" onclick="Button1_Click" ValidationGroup="btn" />
</td>
<td style="width: 43.5px">
</td>
</tr>
<tr>
<td style="width:43.5px"> </td>
<td style="width:131.25px"> </td>
<td style="width:131.25px"> </td>
<td style="width:43.5px"> </td>
</tr>
<tr>
<td style="width: 43.5px">
</td>
<td style="width: 131.25px">
<asp:LinkButton ID="LinkButton1" runat="server">Forgot Password</asp:LinkButton>
</td>
<td style="width: 131.25px">
<asp:Button ID="Button3" runat="server" CssClass="button" Text="Sign Up" onclick="Button3_Click" />
</td>
<td style="width: 43.5px">
</td>
</tr>
<tr>
<td style="width:43.5px"> </td>
<td style="width:131.25px"> </td>
<td style="width:131.25px"> </td>
<td style="width:43.5px"> </td>
</tr>
</table>
</div>
</div>
<asp:ModalPopupExtender ID="ModalPopupExtender2" runat="server"
TargetControlID="Button3" PopupControlID="Panel2"
BackgroundCssClass="modalBackground">
</asp:ModalPopupExtender >
<asp:Panel ID="Panel2" runat="server" CssClass="popup">
<div class="popupsignup">
<div id="Div1" style="height:55px;background-color:#f6f6f6;border-radius:10px;width:398px;font-size:2.7em; "> <font style="margin:30px 0px 0px 20px;vertical-align:middle;color:#87a310;line-height:1.2em; font-size:37px; font-family:Calibri;"> SignUp Here </font></div>
<div class="PopupBody">
</div>
</div>
</asp:Panel>
As shown above I'm having two popups but on imagebuton first popup is getting visible which is alright while clicking on signup button my second popup should be visible which is also alright but in background login popup should must be getting hide while signup pop up is visible.
anyone please help me out from this.
Got Solution...
I have to put cacelControlId of popup one to Linkbutton1 Not btnSignup..
Thank Godd..

How do I use html decode in my view page?

My engine is Aspx.
I am currently having trouble editing one of my columns(Question Answer) in my table because it has html tags in it. Is there a way I can decode only that specific row/column in the value area?
<form id="updateFreqQuestionsUser" action="<%=Url.Action("SaveFreqQuestionsUser","Prod")%>" method="post">
<table>
<tr>
<td colspan="3" class="tableHeader">Freq Questions User Details <input type ="hidden" value="<%=freqQuestionsUser.freqQuestionsUserId%>" name="freqQuestionsUserId"/> </td>
</tr>
<tr>
<td colspan="2" class="label">Question Description:</td>
<td class="content">
<input type="text" maxlength="2000" name="QuestionDescription" value="<%=freqQuestionsUser.questionDescription%>" />
</td>
</tr>
<tr>
<td colspan="2" class="label">QuestionAnswer:</td>
<td class="content">
<input type="text" maxlength="2000" name="QuestionAnswer" value="<%=freqQuestionsUser.questionAnswer%>" />
</td>
</tr>
<tr>
<td colspan="3" class="tableFooter">
<br />
<a id="freqQuestionsUserUpdateButton" href="#" class="regularButton">Save</a>
Cancel
</td>
</tr>
</table>
Yes, you can do this:
<input type="text" maxlength="2000" name="QuestionAnswer"
value="<%=Server.HtmlDecode(freqQuestionsUser.questionAnswer)%>" />
Reference

Value cannot be null. Parameter name: control

<cc1:ConfirmButtonExtender DisplayModalPopupID="ModalPopupExtender4" ID="ConfirmButtonExtender4"
runat="server" TargetControlID="lnkremoveloc" Enabled="False" OnClientCancel="RemoveLocations">
</cc1:ConfirmButtonExtender>
<cc1:ModalPopupExtender ID="ModalPopupExtender4" OkControlID="btnDisable" CancelControlID="btnCancel"
BackgroundCssClass="modalBackground" PopupControlID="pnlRemove" TargetControlID="lnkremoveloc"
runat="server">
</cc1:ModalPopupExtender>
<asp:Panel CssClass="modalPopup" ID="PnlRemove" runat="server">
<!-- Common Popup Control Begin -->
<table class="tblCommonPopup" width="400" cellpadding="0" cellspacing="0">
<tr>
<td class="topLeft">
</td>
<td class="topMiddle">
</td>
<td class= "topRight">
</td>
</tr>
<tr>
<td colspan="5" class="middle" align="center">
<!-- Content Area Begin -->
<table>
<tr>
<td colspan="1" style="padding-top: 10px;" title="Select">
</td>
<td colspan="4" style="padding-top: 10px;" title="Location Name">
</td>
</tr>
<tr>
<td align="center" colspan="5">
<input id="btnDisable" type="button" value="Disable" class="popupButton" />
<input id="Cancel" type="button" value="Cancel" class="popupButton" />
</td>
</tr>
</table>
<!-- Content Area Ends -->
</td>
</tr>
<tr>
<td class="bottomLeft">
</td>
<td class="bottomMiddle">
</td>
<td class="bottomRight">
</td>
</tr>
</table>
<!-- Common Popup Control End -->
</asp:Panel>
That error means that there's a Dependency Property that has a null value where one is not allowed. Unfortunately you only pasted partial code so I can't tell which property it is - please paste the full code of your control.

how to call asp page from html page

I got the problem while uploading the pages of html & asp.
Actually i have one html page name as index.html & other one is asp page name as ContactUsNew.aspx. There is a link in html page for a "contact Us" page. & for this link i use the code.
<td style="height: 42px">
<p class="menu01">CONTACT US</p>
</td>
When I run this application in localhost it run successfully, but when I upload these pages on ftp that time the path specified for contact us link on index.html page not switches to contactusnew.aspx page. there is path error occurred
I created the below page:
<%# Page Language="VB" AutoEventWireup="false" CodeFile="ContactUsNew.aspx.vb" Inherits="clients_excel_ContactUsNew" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Excel Informatics Pvt. Ltd. :: Careers</title>
<link rel="stylesheet" type="text/css" href="images/style.css" />
</head>
<body >
<form id="form1" runat="server">
<table width="759" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="256">
<img src="images/main01.jpg" width="256" height="41"></td>
<td background="images/fon01.gif">
<table width="503" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="270">
<a href="index.html">
<img src="images/but_home.gif" width="74" height="41" border="0"></a><img src="images/separator.gif"
width="2" height="41"><a href="ContactUs.aspx"><img src="images/but_contacts.gif"
width="96" height="41" border="0"></a><img src="images/separator.gif" width="2" height="41"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="157">
<img src="images/main_logo.gif" width="256" height="157"></td>
<td width="503">
<img src="images/main03.gif" width="503" height="157"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="759" align="center" background="images/fon_menu.gif">
<tr>
<td>
<img src="images/menu01.gif" width="3" height="42" alt="" border="0"></td>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<p class="menu01">
HOME</p>
</td>
<td>
<img src="images/e_menu.gif" alt="" width="24" height="42" border="0" /></td>
<td>
<p class="menu01">
COMPANY</p>
</td>
<td>
<img src="images/e_menu.gif" alt="" width="24" height="42" border="0" /></td>
<td>
<p class="menu01">
SERVICES</p>
</td>
<td>
<img src="images/e_menu.gif" alt="" width="24" height="42" border="0" /></td>
<td>
<p class="menu01">
CUSTOMERS</p>
</td>
<td>
<img src="images/e_menu.gif" alt="" width="24" height="42" border="0" /></td>
<td>
<p class="menu01">
CAREERS</p>
</td>
<td>
<img src="images/e_menu.gif" alt="" width="24" height="42" border="0" /></td>
<td>
<p class="menu01">
CONTACT US</p>
</td>
</tr>
</table>
</td>
<td align="right">
<img src="images/menu02.gif" width="3" height="42" alt="" border="0"></td>
</tr>
</table>
<div align="center">
<img src="images/main01.gif" width="759" height="5" alt="" border="0"></div>
<table border="0" cellpadding="0" cellspacing="0" width="759" align="center">
<tr valign="top">
<td background="images/fon_left.gif">
<img src="images/fon_left.gif" width="3" height="13" alt="" border="0"></td>
<td width="753" bgcolor="#FFFFFF">
<p class="px5">
<table border="0" cellpadding="12" cellspacing="0" width="100%">
<tr valign="top">
<td>
<!-- right -->
<table border="0" cellpadding="0" cellspacing="0" style="height: 375px">
<tr>
<td colspan="3" height="25" bgcolor="#777777">
<p class="title">
<img src="images/e01.gif" width="8" height="8" alt="" border="0"> Contact
Us</p>
</td>
</tr>
<tr>
<td colspan="3" bgcolor="#CCCCCC">
<img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
</tr>
<tr>
<td rowspan="3" bgcolor="#CCCCCC">
<img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
<td bgcolor="#EF9400" height="3">
<img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
<td rowspan="3" bgcolor="#CCCCCC">
<img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
</tr>
<tr>
<td width="725">
<table width="100%">
<tr>
<td>
<p>
Let us show you how we can help you with your IT requirements.</p>
<p>
<b>Excel Informatics Pvt. Ltd.</b><br />
C-2, Suryodaya Complex, Bldg. F.,<br />
Survey No. 154/4, Kalbhor Nagar,<br />
Chinchwad, Pune - 411019<br />
Maharashtra, INDIA<br />
Phone: 91+20+27476633, 27454132
</p>
<p>
<b>E-mail:</b> info#eiplonline.com<br />
or <a href="mailto:excelcom#vsnl.com"
style="color: Blue">excelcom#vsnl.com</a></p>
<div style="height: 120px;">
</div>
</td>
<td>
<table class="txt" cellpadding="2" width="350" cellspacing="0">
<% If CType(Context.Items("success"), Boolean) = True Then%>
<tr>
<td height="30" colspan="3">
<b>
<asp:label id="LblSq" runat="server" text="Thank you for taking the time to give us your enquiry."
cssclass="txtgrn" font-size="9pt"></asp:label>
</b>
</td>
</tr>
<tr>
<td height="10" style="width: 348px">
</td>
</tr>
<% Else%>
<tr>
<td colspan="2" class="help">
All fields marked with * are mandatory.</td>
</tr>
<tr>
<td align="center" style="width: 348px">
<table cellpadding="4" cellspacing="0">
<tr>
<td align="left" width="120">
<span class="txterr">*</span> Your Name</td>
<td width="230" align="left">
<asp:textbox id="TxtName" runat="server" cssclass="txtbox" maxlength="100"></asp:textbox>
<asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" controltovalidate="TxtName"
display="Dynamic" errormessage="Name is Required."></asp:requiredfieldvalidator>
</td>
</tr>
<tr>
<td align="left">
Address</td>
<td align="left">
<asp:textbox id="TxtAddress" runat="server" cssclass="txtbox" columns="25" maxlength="150"
rows="3" textmode="MultiLine"></asp:textbox>
</td>
</tr>
<tr>
<td align="left">
City</td>
<td align="left">
<asp:textbox id="TxtCity" runat="server" cssclass="txtbox" maxlength="25"></asp:textbox>
</td>
</tr>
<tr>
<td align="left">
State</td>
<td align="left">
<asp:textbox id="TxtState" runat="server" cssclass="txtbox" maxlength="25"></asp:textbox>
</td>
</tr>
<tr>
<td align="left">
Phone No.</td>
<td align="left">
<asp:textbox id="TxtPhno" runat="server" cssclass="txtbox" maxlength="15"></asp:textbox>
</td>
</tr>
<tr>
<td align="left">
<span class="txterr">*</span> Email ID</td>
<td align="left">
<asp:textbox id="TxtEmail" runat="server" cssclass="txtbox" maxlength="100"></asp:textbox>
<asp:label id="LblEmail" runat="server" cssclass="txterr"></asp:label>
<asp:requiredfieldvalidator id="RequiredFieldValidator2" runat="server" controltovalidate="TxtEmail"
display="Dynamic" errormessage="Email is Required."></asp:requiredfieldvalidator>
<asp:regularexpressionvalidator id="RegularExpressionValidator1" runat="server" controltovalidate="TxtEmail"
display="Dynamic" errormessage="Enter valid email address." validationexpression="\w+([-+.']\w+)*#\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:regularexpressionvalidator>
</td>
</tr>
<tr>
<td align="left">
Subject</td>
<td align="left">
<asp:textbox id="TxtSubject" runat="server" cssclass="txtbox" maxlength="100"></asp:textbox>
</td>
</tr>
<tr>
<td align="left">
<span class="txterr">*</span> Your Message</td>
<td align="left">
<asp:textbox id="TxtMsg" runat="server" columns="25" rows="3" textmode="MultiLine"
cssclass="txtbox" maxlength="200"></asp:textbox>
<asp:requiredfieldvalidator id="RequiredFieldValidator3" runat="server" controltovalidate="TxtMsg"
display="Dynamic" errormessage="Message is Required."></asp:requiredfieldvalidator>
</td>
</tr>
<tr>
<td>
</td>
<td align="left">
<asp:button id="BtnSubmit" runat="server" cssclass="txtbox" text="Submit" height="22px"
width="60px" />
<asp:button id="BtnReset" runat="server" cssclass="txtbox" text="Reset" causesvalidation="False"
height="22px" width="60px" />
</td>
</tr>
</table>
</td>
</tr>
<% End If%>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="images/t_fon.gif" height="28">
<img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
</tr>
<tr>
<td colspan="3" align="right">
<img src="images/t_bot.gif" width="229" height="9" alt="" border="0"></td>
</tr>
</table>
<!-- /right -->
</td>
</tr>
</table>
<br>
</td>
<td background="images/fon_right.gif">
<img src="images/fon_right.gif" width="3" height="10" alt="" border="0"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="759" align="center">
<tr>
<td colspan="2" background="images/fon_bot.gif" height="42" align="right">
<table border="0" cellpadding="0" cellspacing="0" width="510" background="">
<tr>
<td>
<p class="menu02">
Home</p>
</td>
<td>
<p class="menu02">
Company</p>
</td>
<td>
<p class="menu02">
Services</p>
</td>
<td>
<p class="menu02">
Customers</p>
</td>
<td>
<p class="menu02">
Careers</p>
</td>
<td>
<p class="menu02">
Contact Us</p>
</td>
</tr>
</table>
</td>
</tr>
<tr align="center">
<td width="270" height="65">
<img src="images/logo_bot.gif" alt="" border="0"></td>
<td width="490">
<p align="center" style="color: #FFFFFF;">
Copyright © 2009 Excel Informatics Pvt. Ltd.
Designed & developed by <a style="color: #FFFFFF;" href="http://www.itiersolutions.com"
target="iTier">iTier solutions</a></p>
</td>
</tr>
</table>
</form>
</body>
</html>
Please check if the contactusnew.aspx file is also uploaded and that your webserver supports ASP.NET.
#Amol: this is an answer that perhaps matches with your problem.
This is from http://forums.asp.net/t/1148374.aspx
instructions:
During development on my computer my project worked fine. When I copied it to the web server it failed with and error "Context is not a member of." I could not find the solution to the problem anywhere. By trial and error I found a solution that worked. I did the following for mypage.aspx with code behind mypage.aspx.vb.
◦I backed up the project.
◦The solution explorer contained a file mypage.aspx.designer.vb. I deleted it. Why? I noticed that when I created a new web form on the web server the designer.vb file was not included.
◦I changed the page directive so that it read CodeFile = "~/MyFolder/MyPage.aspx.vb". The full path within the root directory needs to be in the quotes.
◦I made sure the directive Inherits ="MyPage". This should be exactly the same name as the partial class in MyPage.aspx.vb.
◦I built the page.
◦After I corrected a few pages and ensured that they worked I used "Edit - Replace in files" menu command to change my code and I deleted all the .aspx.designer.vb files.

Resources