|
you need to check what page your masterpage is on, some things you put in masterpage cant be used as they conflict with the pages that are using masterpage
try putting a simple webpage up with masterpage as its linked page and go from there
post what other errors you get
object reference usually means you have created a control but not referenced e.g.
aspbutton onlcik="something"
but you havent declared the onclick
make sense!!
|
|
|
|
|
I see you have changed your post.
If I am making sense of your problem, you are trying to access a control in a hidden div?you can't do this.
This might explain the object reference error
|
|
|
|
|
yes you are right But friend that problem i've solved. Please suggest me what should i do now.
|
|
|
|
|
post all your code and I can see whats going on
|
|
|
|
|
<script language="javascript">
function showDiv()
{
e=document.getElementById("<%=divCityInformation.ClientID%>");
//e=document.getElementById('divCityInformation');
if(e.style.display=="none")
{
e.style.display="block";
}
else
{
e.style.display="none";
}
}
</script>
===================
<a href="#" onclick="showDiv();" class="manojLink" title="Click Here To Enter New City">Click Here To Enter New City</a>
===================
<div id="divCityInformation" style="border:solid 1px black; width:400px;top:125px;left:250px;position:absolute;display:none; background-color:#efefef;" runat="server">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td colspan="2" align="right" class="manojHeaderStrip1">
New City Information
<a href="#" onclick="showDiv();" title="Close" style="text-align:right;color:Red;color:White;font-size:8.5pt;">[Close]</a>
</td>
</tr>
<tr>
<td colspan="2" height="20">
</td>
</tr>
<tr>
<td style="width: 50%" class="manojTDRight">
Enter City Name</td>
<td style="width: 100px">
<asp:TextBox ID="txtCityName" runat="server" CssClass="manojTextBox1"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2" style="height:7px;">
</td>
</tr>
<tr>
<td style="width: 50%" class="manojTDRight">
Enter Column No.</td>
<td style="width: 100px">
<asp:DropDownList ID="ddlColumn" runat="server" Width="150">
<asp:ListItem Selected="True">1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td style="width: 50%" height="10">
</td>
<td style="width: 100px">
</td>
</tr>
<tr>
<td style="width: 50%" class="manojTDRight">
<input type="submit" id="Submit1" value="Submit" runat="server" onserverclick="Submit1_ServerClick" />
</td>
<td style="width: 100px" class="manojTDLeft">
<input type="reset" id="Reset1" />
</td>
</tr>
<tr>
<td class="manojTDRight" height="10" style="width: 50%">
</td>
<td class="manojTDLeft" style="width: 100px">
</td>
</tr>
<tr>
<td class="manojTDRight" colspan="2" height="10">
<asp:Label ID="Label1" runat="server"></asp:Label></td>
</tr>
</table>
</div>
======================================
protected void Submit1_ServerClick(object sender, EventArgs e)
{
HtmlControl frame1 = (HtmlControl)this.FindControl("divCityInformation");
frame1.Visible = true;
}
|
|
|
|
|
I've just tested the code and it works
Try putting the following code in a .cs file if you havent already. like a code behind file
protected void Submit1_ServerClick(object sender, EventArgs e)
{
HtmlControl frame1 = (HtmlControl)this.FindControl("divCityInformation");
frame1.Visible = true;
}
|
|
|
|
|
Hi,
How I will display Yes, No, Cancel, 3 buttons in javascript message box. There is no problem to create two buttons.
Thanks in advance
|
|
|
|
|
You cant do all three options in javascript
|
|
|
|
|
I found something similar here
[^]
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
iam using username and password screen to enter into the next page .in the 2page i have logout screen to log out ...but if the user click on the close button of the ie screen how i can identify that user has did a wrong click or how can i identify user clicked close button
|
|
|
|
|
You can try to do this with an AJAX call, but you can't be certain it will work. Best to write an app that doesn't rely on this behaviour.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi mr.Christian Graus actually before i used master page and on master page body unload i called a function but now iam using a user control to the pages as baner to every page .this baner is having logout and on clicking log out im calling the function.
will u give any idea of that application that does not rely on this behaviour
|
|
|
|
|
Well, basically, don't do anything where you rely on knowing the user logged out. For example, when you store in your DB that someone is logged in, also store the time of their last action, and once their last action has been more than a certain time ago, log them out.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
this is very true because if some1 closes the browser window or their machine crashes then you have no way of knowing they logged out.
You could use session variables and put time limits/counts on that
|
|
|
|
|
HI All
i have a textarea. and i want to count number of lines in this textarea.
actually i have created a HTML Editor using textarea.
can anybody tell me how to solve this problem.
thanks.
|
|
|
|
|
you can count for the number of occurances for \n
function countRows()
{
var rows = document.getElementById("test").value.split('\n');;
alert(rows.length);
}
this will give the number of lines
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
|
|
|
hello all
I need to center align the contents of my web page as many of the websites does these days(eg. www.msn.com), while reading through diff sites i got to know that we can do it with hlp of css files but not exactly how....can anyone hlp me out on same??
|
|
|
|
|
it depennds how u align the tables.In tables u can align contents in center.no need to go for css.
right click inside the table > build style > align : center
|
|
|
|
|
please don't use tables, it much better to use div tags and then use css to position
Do you want your website to be 800x600 or bigger?
|
|
|
|
|
Thanks for the information
It'll be helpful if you can provide an example of a css file for center aligning.
|
|
|
|
|
Put the content in a div and use javascript to center it. works for all screen resolutions. check this link [^]
|
|
|
|
|
Thanks!!
I will try the stuff and will get back to you
|
|
|
|