|
Hi There,
I am facing a unique problem.I had taken a check box in a gridview.And I want to fire Checked Change Event Of Checkbox.But It didn't get fired.If I open any previous project from my backup then it get fired.But in my this project I am not able to fire this event.Whats the problem with the project.If I take that page in another project and try to fire the event then also it didn't get fired.Even if I copy any control from this page then also it didn't get fired.But if I take a fresh project with new controls then that event get fired.Can anyone tell me what is the problem.
Thanks.
|
|
|
|
|
Did you set AutoPostBack property to true?
Calin
|
|
|
|
|
Hello Friends,
I've a gridview in that gridview i've taken a commmand named "Play" for playing different-different songs and songs name are also unique. Its working fine in the browser "Flock" and caching those videos in Internet Explorer. Can anybody suggest me the way
here i'm giving the link where i've uploaded it.
http://www.saamstesting.com/Admin/VideoUpload.aspx[^]
modified on Saturday, February 14, 2009 12:23 AM
|
|
|
|
|
did you try disabling caching ??
1[^]
2[^]
3[^]
|
|
|
|
|
I've already done it. But it's still doing that.........
modified on Saturday, February 14, 2009 3:41 AM
|
|
|
|
|
Hi,
I have a UpdatePanel with a div.
<updatepanel id="UpdatePanel1" runat="server">
<contenttemplate>>
aaaaa
In the server side I change the content of the testDiv on every asynchronous postback. And when the updatepanel gets updated, I want to fire a javascript event. This is what I do
function pageLoad() {
$addHandlers($get('testDiv'),
{ 'DOMAttrModified' : test,
'propertychange' : test});
}
function test(eventName)
{
alert('Success');
}
This seems to work in ie but fails in firefox. The event DOMAttrModified never gets fired. Please advise. Here is a link that might help
http://www.chrisrauber.com/blog/CommentView,guid,5674c491-eb0e-46dc-80ef-c87fbe606759.aspx[^]
|
|
|
|
|
its strange. the link mentions that DOMAttrModified is not supported in IE and should work well in firefox. read this [^]
|
|
|
|
|
Thanks for the response.
Well DOMAttrModified works if I use it in a normal way. But when it comes to updatepanel it does not work. In an asynchronous postback, the innerHTML property of the UpdatePanel is replaced with the new html from the server, so DOMAttrModified event should get fired. The onpropertychange of ie does get fired in this case.
|
|
|
|
|
hi
i have the following scenario:
each employee authorized to just enter some pages in web site, as an example : jack can enter page 1 ,2 and 3 ,mary can enter page 1 and 3;
i want each employee to see a treeview that show him/her the pages that can enter;
what is the best way to implement this dynamic view, i mean, i want each employee when enter to see a treeview with pages that can access and i need to keep this tree view alife while he is logging on.
HINT: i am not using neither membership nor roles in my web site, i have my own database to store users and to store pages which they can access
is there any useful tutorial in this domain
thank you
|
|
|
|
|
If there is no login being done, then your only hope is if each user only uses one PC, each PC only has one user, and the IP addresses are static and NEVER change. Odds are, you can't do it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
thank you
yes each user has username and password, and i want to display the treeview after login
|
|
|
|
|
OK, then it's easy. You build a list of things you could show and make your permission system tell you what stuff you should show, once they are logged in.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello,
I have a text from a textbox witch i want to put in my database.
The problem is with all the new line. I think i need to insert CHAR(13) where i want the newline.
Code:
News var = new News{TxtNews.Text.ToString()};
db.News.InsertOnSubmit(var);
db.SubmitChanges();
If i write in the textbox " BLA BLA CHAR(13) BLA BLA " it will write in the database " BLA BLA CHAR(13) BLA BLA ". I want it to write:
"BLA BLA
BLA BLA".
Any ideas?
|
|
|
|
|
Environment.NewLine, which is 10 13 or 13 10 ( I forget, b/c I do it properly and use Environment.NewLine )
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I am new..
Can be more specific? Put Environment.NewLine(10 13)?? where?
|
|
|
|
|
I am careful to always give people the keywords they need to google for examples if they are really lost.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
if you mean "BLA BLA Environment.NewLine BLA BLA" it doesn't work..
|
|
|
|
|
Try "BLA BLA" + Environment.NewLine + "BLA BLA"
|
|
|
|
|
I have thought of that.. but i don't know how to do it because i have more than 1 newlines.
My idea was to put something like "@#%x" when i want a new line and then:
string s,ss;
s = TxtNews.Text.ToString();
ss = s.Split(""@#%x");
s= ss(0) + Environment.NewLine + ss(1);
But i have more then 1 newline, and not the same number. I don't know how to count how many times "@#%x" because string method Contains returns a bool, not an number. Can someone show me another way to do it?
|
|
|
|
|
|
When you KNOW you're so new that you don't know much, you should expect that it 'doesn't work' because you did it wrong. So, post what you did, so we can see it.
However, I just see you're in the ASP.NET forum, in which case you need to insert break tags <br/> in your HTML to get a newline.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Set the MultiLine property of the TextBox to true, so that it renders as a textarea . Then it supports multiple lines, and you don't need to put any awkward codes in the text where you want line breaks.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I have created a page that has frozen listview headers and it works in IE and FF. The problem is in IE 6 and 7 when you try resize the browser window, change screen resolutions, or sometimes when changing browser tabs; the relative positioned table headers jump up to the top of the page or disappear completely. FF is working correctly in all instances. I have read that there is a bug in ie 6 and 7 that causes this. All the solutions I have read have not worked for me. I have tried giving the body relative positioning and also wrapping the listview in a div and giving it absolute or relative positioning. Here is the css and asp.net code. Any help would be GREATLY appreciated.
<pre>
<head id="Head1" runat="server">
<link href="~/Styles/StyleSheet.css" rel="stylesheet" type="text/css"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ListView ID="lvJOA" runat="server" EnableViewState="False" >
<LayoutTemplate>
<div id="lvTableWrapper">
<table id="JOATable" border="1" cellpadding="5" cellspacing="0" summary="Holds the Job Listing.">
<thead>
<tr>
<th>
<asp:LinkButton runat="server" ID="lnkbtnJobClass" OnClientClick="setSortBy('JobClass')">Job Classification</asp:LinkButton>
</th>
<th>
<asp:LinkButton runat="server" ID="lnkbtnSalary" OnClientClick="setSortBy('Salary')">Semi-Monthly Salary</asp:LinkButton>
</th>
<th>
<asp:LinkButton runat="server" ID="lnkbtnApplicationProcess" OnClientClick="setSortBy('AppProcess')">Application Process</asp:LinkButton>
</th>
<th>
<asp:LinkButton runat="server" ID="lnkbtnClosingDate" OnClientClick="setSortBy('ClosingDate')">Closing Date</asp:LinkButton>
</th>
<th>
<asp:LinkButton runat="server" ID="lnkbtnVacancies" OnClientClick="setSortBy('Vacancies')">Vacancies</asp:LinkButton>
</th>
<th>
<asp:LinkButton runat="server" ID="lnkbtnLocation" OnClientClick="setSortBy('Location')">Location</asp:LinkButton>
</th>
<th>
<asp:LinkButton runat="server" ID="lnkbtnAgency" OnClientClick="setSortBy('Agency')">Agency</asp:LinkButton>
</th>
<th>
<asp:LinkButton runat="server" ID="lnkbtnJobCategory" OnClientClick="setSortBy('JobCategory')">Job Category</asp:LinkButton>
</th>
</tr>
</thead>
<tbody id="JOAtbody" runat="server">
<div runat="server" id="itemPlaceholder" />
</tbody>
</table>
</div>
</LayoutTemplate>
<EmptyDataTemplate>
<table style="width: 100%">
<tr><td> </td></tr>
<tr>
<td class="EmptyDataText" align="center">
No jobs found
</td>
</tr>
</table>
</EmptyDataTemplate>
<ItemTemplate>
<tr>
<td width="0px">
<asp:HyperLink ID="hlJobClass" Target="_blank" NavigateUrl='<%# Eval("JobClassURL") %>' runat="server"><%# Eval("JobClass") %></asp:HyperLink>
</td>
<td width="0px">
<asp:Label ID="lblSalary" runat="server" Text='<%# Eval("Salary") %>'></asp:Label>
</td>
<td width="0px">
<asp:HyperLink ID="hlApplicationProcess" Target="_blank" NavigateUrl='<%# Eval("ApplicationProcessURL") %>' runat="server"><%# Eval("ApplicationProcess") %></asp:HyperLink>
</td>
<td width="0px">
<asp:Label ID="lblClosingDate" runat="server" Text='<%# Eval("ClosingDate") %>'></asp:Label>
</td>
<td width="0px">
<asp:Label ID="lblVacancies" runat="server" Text='<%# Eval("Vacancies") %>'></asp:Label>
</td>
<td width="0px">
<asp:Label ID="lblLocation" runat="server" Text='<%# Eval("Location") %>'></asp:Label>
</td>
<td width="0px">
<asp:Label ID="lblAgency" runat="server" Text='<%# Eval("Agency") %>'></asp:Label>
</td>
<td width="0px" style="padding-right: 15px;">
<asp:HyperLink ID="hlJobCategory" Target="_blank" NavigateUrl='<%# Eval("JobCategoryURL") %>' runat="server"><%# Eval("JobCategory")%></asp:HyperLink>
</td>
</tr>
</ItemTemplate>
</asp:ListView>
<asp:Button ID="btnShowAll" runat="server" Text="Show All Jobs" onclick="btnShowAll_Click" visible="false"/>
<asp:Label ID="lblCategory" runat="server" Text="Search by Job Category: "></asp:Label>
<asp:DropDownList ID="ddlJobCategory" runat="server" AutoPostBack="True" onselectedindexchanged="ddlJobCategory_SelectedIndexChanged"></asp:DropDownList>
<asp:HiddenField ID="hdnSortBy" runat="server" />
</form>
</body>
</html>
</pre>
body
{
margin-left: 10px;
font-family:Arial, Helvetica, sans-serif;
min-width: 769px;
max-width: 990px;
height: 1170px;
position: relative;
}
#lvTableWrapper
{
width: 99%;
height: 420px;
overflow: auto;
font-size: small;
}
#lvTableWrapper #JOATable
{
border-collapse: separate;
border-top: none;
width: 98%;
/* IE Only */
#border-collapse: collapse;
}
#lvTableWrapper th
{
background-color: #000066;
color: White;
height: 30px;
text-align:center;
position: relative;
}
#lvTableWrapper tbody
{
overflow: auto;
height: 350px;
overflow-x: hidden;
}
#lvTableWrapper tr
{
height: 1px;
}
#lvTableWrapper th a:visited
{
color: White;
}
#lvTableWrapper th a:link
{
color: White;
}
|
|
|
|
|
I found a solution to this. I basically had to add another div around my lvTableWrapper div and give it relative positioning. After that I had to target the thead rows in lvTableWrapper div, which in this case is just one row and give them position:absolute;top ;left ;.
I changed the name of lvTableWrapper div when I added the extra wrapper div so it will be different in the code listed below. I may have missed some little details, so I'll post the code. I hope this helps someone...
<asp:ListView ID="lvJOA" runat="server" EnableViewState="False" >
<LayoutTemplate>
<div id="lvTableWrapperOutside">
<div id="lvTableWrapperInside">
<table id="JOATable" border="1" cellpadding="5" cellspacing="0" summary="Holds the Job Listing.">
<thead>
<tr>
<th scope="col">
<asp:LinkButton runat="server" ID="lnkbtnJobClass" OnClientClick="setSortBy('JobClass')">Job Classification</asp:LinkButton>
</th>
<th scope="col">
<asp:LinkButton runat="server" ID="lnkbtnSalary" OnClientClick="setSortBy('Salary')">Semi-Monthly Salary</asp:LinkButton>
</th>
<th scope="col">
<asp:LinkButton runat="server" ID="lnkbtnApplicationProcess" OnClientClick="setSortBy('AppProcess')">Application Process</asp:LinkButton>
</th>
<th scope="col">
<asp:LinkButton runat="server" ID="lnkbtnClosingDate" OnClientClick="setSortBy('ClosingDate')">Closing Date</asp:LinkButton>
</th>
<th scope="col">
<asp:LinkButton runat="server" ID="lnkbtnVacancies" OnClientClick="setSortBy('Vacancies')">Vacancies</asp:LinkButton>
</th>
<th scope="col">
<asp:LinkButton runat="server" ID="lnkbtnLocation" OnClientClick="setSortBy('Location')">Location</asp:LinkButton>
</th>
<th scope="col">
<asp:LinkButton runat="server" ID="lnkbtnAgency" OnClientClick="setSortBy('Agency')">Agency</asp:LinkButton>
</th>
<th scope="col">
<asp:LinkButton runat="server" ID="lnkbtnJobCategory" OnClientClick="setSortBy('JobCategory')">Job Category</asp:LinkButton>
</th>
</tr>
</thead>
<tbody id="JOAtbody" runat="server">
<div runat="server" id="itemPlaceholder" />
</tbody>
</table>
</div>
</div>
</LayoutTemplate>
<EmptyDataTemplate>
<table style="width: 100%">
<tr><td> </td></tr>
<tr>
<td class="EmptyDataText" align="center">
No jobs found
</td>
</tr>
</table>
</EmptyDataTemplate>
<ItemTemplate>
<tr>
<td width="0px">
<asp:HyperLink ID="hlJobClass" Target="_blank" NavigateUrl='<%# Eval("JobClassURL") %>' runat="server"><%# Eval("JobClass") %></asp:HyperLink>
</td>
<td width="0px">
<asp:Label ID="lblSalary" runat="server" Text='<%# Eval("Salary") %>'></asp:Label>
</td>
<td width="0px">
<asp:HyperLink ID="hlApplicationProcess" Target="_blank" NavigateUrl='<%# Eval("ApplicationProcessURL") %>' runat="server"><%# Eval("ApplicationProcess") %></asp:HyperLink>
</td>
<td width="0px">
<asp:Label ID="lblClosingDate" runat="server" Text='<%# Eval("ClosingDate") %>'></asp:Label>
</td>
<td width="0px">
<asp:Label ID="lblVacancies" runat="server" Text='<%# Eval("Vacancies") %>'></asp:Label>
</td>
<td width="0px">
<asp:Label ID="lblLocation" runat="server" Text='<%# Eval("Location") %>'></asp:Label>
</td>
<td width="0px">
<asp:Label ID="lblAgency" runat="server" Text='<%# Eval("Agency") %>'></asp:Label>
</td>
<td width="0px" style="padding-right: 15px;">
<asp:HyperLink ID="hlJobCategory" Target="_blank" NavigateUrl='<%# Eval("JobCategoryURL") %>' runat="server"><%# Eval("JobCategory")%></asp:HyperLink>
</td>
</tr>
</ItemTemplate>
</asp:ListView>
body
{
margin-left: 10px;
font-family:Arial, Helvetica, sans-serif;
min-width: 778px;
max-width: 990px;
height: 1170px;
}
#lvTableWrapperOutside
{
position: relative;
}
#lvTableWrapperInside
{
width: 99%;
height: 420px;
overflow: auto;
font-size: small;
}
#lvTableWrapperInside #JOATable
{
border-collapse: separate;
border-top: none;
width: 98%;
/* IE Only */
#border-collapse: collapse;
}
#lvTableWrapperInside th
{
background-color: #000066;
color: White;
height: 30px;
text-align:center;
position: relative;
}
#lvTableWrapperInside tbody
{
overflow: auto;
height: 350px;
overflow-x: hidden;
}
#lvTableWrapperInside thead tr
{
/* IE Only */
#position:absolute;
#top ;
#left ;
}
#lvTableWrapperInside tr
{
height: 1px;
}
#lvTableWrapperInside th a:visited
{
color: White;
}
#lvTableWrapperInside th a:link
{
color: White;
}
<div class="ForumMod">modified on Wednesday, February 18, 2009 2:41 PM</div>
|
|
|
|
|
One more thing, padding required for outside div in IE so the first so many rows are not hidden by the header.
#lvTableWrapperOutside
{
position: relative;
#padding: 4em 0 2em 0;
}
|
|
|
|