|
No you can't eliminate the #, its how JQuery identifies element IDs. It sounds as though the getting the element isn't the problem, its the mask function. Are you sure you have included the proper javascript links on your page?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
This is how I have the code set up on the control, as you can see I have the JQuery function commented until I can understand and solve what is going wrong!
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MaskControl.ascx.cs" Inherits="Prototype.CommonControls.MaskControl" >
<asp:textbox id="date" runat="server" width="136px" cssclass="dateMask">
|
|
|
|
|
And $('.dateMask') is a valid element?
Have you tried
$(document).ready()
{
$('.dateMask').mask("99/99/9999");
});
It doesn't have anything to do with the problem but you should place the javascript in a seperate file rather than in the control. It will improve the maintainability of your code.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
The code I am using is from a website called "http://digitalbush.com/projects/masked-input-plugin" and I followed was given on the site. As shown below:
JQuery(function ($) {
$('#<%=date.ClientID %>;').mask("99/99/9999");
});
When I followed the example given on the website, all I was getting is the Microsoft JScript error message. Then I have tried all various ways with CssClass. I will try the example you have given, but I can't try it until Monday. Should it not work, what other advice can you give for me to try?
|
|
|
|
|
That is the problem with just copying code without understanding it.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi
Well, I applied the following code, and added some more:
$(document).ready()
{
$('.dateMask').mask("99/99/9999");
});
To check that JQuery was picking up the ids of the control, I added $('input[class$=dateMask]') and sent the output to an alert box. Thankfully JQuery found the control by class, but fell over when applying the mask. So, the problem lies with the plugin!
|
|
|
|
|
Alert boxes are not debugging tools. You have the source, set a break point and debug.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I placed a listview on my page:
<div id="resultList">
<asp:ListView ID="lstResults" runat="server">
<LayoutTemplate>
<table id="Table1" runat="server" class="TableCSS">
<tr id="Tr1" runat="server" class="TableHeader">
<td id="Td1" runat="server">
Merchant Name
</td>
</tr>
<tr id="ItemPlaceholder" runat="server">
</tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr class="ItemCSS">
<td>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Title")%>'>
</asp:Label>
</td>
</tr>
</ItemTemplate>
</asp:ListView>
</div>
and I'm binding it like this:
private void loadList()
{
categoryID = (int)Session["categoryID"];
zipCode = Session["zipCode"].ToString();
merchants = TDCBizObj.GetMerchantsByQuery(categoryID, zipCode);
lstResults.DataSource = merchants;
lstResults.DataBind();
}
When I run the page, I see the merchant titles, but the rows are not 'selectable'. They look like labels, not list items. I mean, when I click a row, it doesn't highlight. What am I doing wrong?
Everything makes sense in someone's mind
|
|
|
|
|
The row doesn't highlight on click because you have not told it to do so. You must add some JavaScript to the row element that handles the onClick event and highlights the row as desired.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
when i am opening a 3.5 related web project then Ajax extension is showing i mean script manager,update panel etc but when i am opening 2.0 web project then Ajax extension is not showing. so please guide me what to do if i want Ajax extension should available in case of 2.0 related project when i will open it through VS2008. do i need to download any path if so then please tell me URL from where i can download Ajax extension for 2.0. please help urgent.
thanks in advance.
tbhattacharjee
|
|
|
|
|
in .NET 3.5, Ajax is integragated with the webproject but in .NET 2.0, one need to install the ajax extensions and tool kit if want to use.
you can get the extension from here
|
|
|
|
|
thanks u very much.
tbhattacharjee
|
|
|
|
|
Your welcome
|
|
|
|
|
hi guys. i want to store value in session to keep it between postbacks. after page is changed i don't need value anymore. is there a way to kill session on current page i am, before redirect (changing url)? i dont want to use ViewState.
void Page_Load()
{
if(!Page.IsPostBack)
{
Session["something"] = true
}
}
void Page_LoadComplete()
{
bool something = Session["something"] as bool;
}
|
|
|
|
|
You can use
Session.Remove("something");
wherever you want.
|
|
|
|
|
Am I understanding you correctly, that you need the value to be part of the session as long as the user is using PostBack, but on a new page load, the session value should be empty?
If that is the case, then you can do this simply like this
void Page_Load()
{
if(!Page.IsPostBack)
{
Session["something"] = true;
}
else
{
Session["something"] = false;
}
}
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Hi, I have a interview next week and I have been told there is a test to:
"The technical test will involve creating a SQL server database, importing data into the database and writing a programme to extract data using SQL and C# and ASP.NET."
Can anybody who has set or taken something similar please advise what I can expect here?
I am thinking the data may be in a flat file or excel spreadsheet and I would need to use DTS or import it via the SQL Server wizard? The extract bit, I would guess is either displaying the results on a web page or writing code to extract it to an excel file?
Thanks in advance!
|
|
|
|
|
Well you haven't told for what post you're going to attend interview and with how much experiance.
If the interview having purely dependency on SQL Db and IMPORT and EXPORT with it, Then It could be of SSRS ( Reporting service ),SSIS ( Integration service) or It could be of data synchronization services.
Regards,
Hiren.
"The more we give of anything, the more we shall get back." - Grace Speare
(you can consider this quote while giving vote also)
Microsoft Dynamics CRM
|
|
|
|
|
Sorry, it's for 1 to 2 years experience of C# ASP.NET, an element of Sharepoint is involved in the job but not in the test
|
|
|
|
|
They it will be quite simple Q&A's, Please make your ADO.Net fundamental very clear for that.
And All the best for Interview.
Regards,
Hiren.
"The more we give of anything, the more we shall get back." - Grace Speare
(you can consider this quote while giving vote also)
Microsoft Dynamics CRM
|
|
|
|
|
Thanks, can anybody else advise on what to expect for the test?
|
|
|
|
|
It is not really easy to tell that what questions will be asked in the interview. This completely depends on the person who is taking the interview. You can get some idea if you know that what kind applications that organization is building. Normally you can expect questions on the basic concepts of oops and their implementation and other stuffs. Besides they also give you some scenario and ask you to give your opinion on it. This is just to know your approach on the problem.
Apurva Kaushal
|
|
|
|
|
Don't use outdated terms like DTS. The current tool would be SSIS. If you don't plan on using entity framework in your sample or something else other than straight ADO.Net in the page, make sure you let them know that a real application would probably use some framework like nHibernate in a real data access layer and not just simple ADO.Net directly in the pages themselves.
Unless of course you personally would normally use ADO.Net directly in the pages. If so, slap yourself with a trout hourly until you learn all about separation of concerns and proper object oriented design.
|
|
|
|
|
Dear Experts,
My requirement is to get the file names in vss folder using .NET.
I have downloaded few dlls like Interop.SourceSafeTypeLib.dll, Microsoft.VisualStudio.SourceSafe.Interop.dll, ssapi.dll.
I have no idea in doing this. can any one help with a solution will be much appreciated.
|
|
|
|
|
You may be able to find your answer by examining the source in this article here on CP.
I wasn't, now I am, then I won't be anymore.
|
|
|
|