|
sir,
difference between a normal class and abstract class?
|
|
|
|
|
You could type that question into Google and get all the information you need.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Why bother doing that when you can get someone else to type it in, look through the links, find a suitable one and post it here? Particularly when that person is then required to answer any questions you might have about the link they've posted.
We're nothing more than a free Mechanical Turk[^] for Google.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Too true.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Then just use links to that page: http://lmgtfy.com/[^]
You provide the link they use it and in the end google what they want. Everyone is happy
No more Mister Nice Guy... >: |
|
|
|
|
|
What an imaginative title, in an asp.net forum. Its just a shame your question has nothing whatsoever to do with asp.net
In answer to your question, an abstract class cannot be instantiated.
|
|
|
|
|
|
Hi,
An abstract class is a class that contains a pure virtual method or function(inc c++). In C#, you do not need a pure virtual method to make a class abstract, just the keyword. Essentially when you make a class abstract, you are saying that you do not want any specific instances of it made, but the class can be used for inheritance. C# only supports single class inheritance. Also, with an abstract class it can contain other non pure virtual methods that provide functionality. For example, I can make an abstract class named Shape with a property to get and set the name and implement an abstract method to return the number of vertexes for that shape. I can't make a shape object, but I can inherit from it to make a square. I do not need to implement the name method because it is already defined, but I do need to implement the vertexes one because it is a pure virtual method.
Interfaces can be thought of as an abstract class that only contains pure virtual methods; however, in C# you can implement multiple interfaces to produce certain behaviors. You still need to implement all of the pure virtual methods, but you can use an interface and another class to represent a different "is-a" relationship.
Comm100 - Leading Live Chat Software Provider
modified 28-May-14 1:47am.
|
|
|
|
|
Hi,
I have used this code to change the cell value :
<script type="text/javascript">
function Open(IdNeed)
{
var grid = document.getElementById('<%=gvEstelam.ClientID%>');
grid.rows[1].cells[4].innerHTML = 152;
alert(grid.rows[1].cells[4].innerHTML);
}
the alert show that the "grid.rows[1].cells[4]" value has changed to 152 and also in gridview it changed
BUT
when i click on OK button of alert then the value is change same as before(ex.500).
How to set the new value to remain ?
And this is my cell code :
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="ImageEstelamBuyingKala" ImageUrl="~/ServerFile/ApplicationFiles/Icons/Button/add.png"
Width="25" runat="server" OnClientClick='<%# " Open("+ DataBinder.Eval(Container.DataItem,"Id") + ");" %>' />
</ItemTemplate>
</asp:TemplateField>
modified 22-Dec-12 11:03am.
|
|
|
|
|
Hi,
You can check the OK button event:
if the Gridview has been reload?
Or you paste your code here
Comm100 - Leading Live Chat Software Provider
modified 28-May-14 1:47am.
|
|
|
|
|
Hello,
I have created one file upload control in my asp.net page,now when ever i upload html page using this file upload ,i want to add one anchor tag to this html page.
Any Suggestions ??
Regards,
Ravi Vyas
|
|
|
|
|
i am not clear with your question,
do you want to add one more anchor tag in your html file?
in that case you need to write into your html file and append the data in the body section.
Let us know if this is your query.
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
|
Hi,
If you want to add the anchor tag to the uploaded file?
Then you should read the file and edit the file and create a new file...
Comm100 - Leading Live Chat Software Provider
-- modified 28-May-14 1:47am.
|
|
|
|
|
|
What is wrong with you?
No more Mister Nice Guy... >: |
|
|
|
|
|
I think that he want to add link to uploaded html, but that is just guess.
No more Mister Nice Guy... >: |
|
|
|
|
|
Hi,
I have jquery implemented for the popup confirmation on radio button select. So my radio button has yes or no options. so in each select, the popup should show up and based on the option, it has to hide and show the panel. But the problem is sometimes for the same option, jquery runs and sometimes for the same option jsquery doesn't run.
the following jquery is in my aspx page.
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
function confirmDelete()
{
if (confirm('It will delete your file. Is that Ok?'))
{
document.getElementById('<%= radbutSelector.ClientID %>').click();
return true;
}
return false;
}
</script>
Now i have called this jquery on radio button select like this
<asp:radiobuttonlist id="radWantEnter" runat="server"
RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="radio"
AutoPostBack="True" onclick="return confirmDelete();"
>
<asp:Button Text="hiddenButton" ID="radbutSelector" runat="server" Style="display: none;"
OnClick="radbutSelector_Click" />
And the code behind the radio button select is like this
protected void radbutSelector_Click(object sender, EventArgs e)
{
if (radWantEnter.SelectedValue == "Yes")
{
pnl1.Visible = true;
}
else
{
pnl2.Visible = false;
}
}
sometimes the radbutSelector executes its codes and sometimes its not for the same event. Any idea and any solutions would be great help.
Dhyanga
modified 19-Dec-12 18:05pm.
|
|
|
|
|
That's a csharp code behind function, there is no Jquery on any example except for $(document).ready. and that's not correct either. You don't need document ready unless your binding events with the document ready.
I can't see how confirm delete works, where does the object confirm come from?
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
});
function confirmDelete()
{
if (confirm('It will delete your file. Is that Ok?'))
{
document.getElementById('<%= radbutSelector.ClientID %>').click();
return true;
}
return false;
}
</script>
|
|
|
|
|
The script is like this:
<script language="JavaScript" type="text/javascript">
function confirmDelete()
{
if (confirm('It will delete your file. Is that Ok?'))
{
document.getElementById('<%= radbutSelector.ClientID %>').click();
return true;
}
return false;
}
</script>
Dhyanga
|
|
|
|
|
In Jquery, it's more along the lines of this. I guessed at the ID or the radio button set, won't work, just an example of how to format it. but it's closer to what you want.
So it binds the change event to the DOM, and fires the function, passing the event to it. Radio buttons are checkboxs, they act the same, and have the same events, so think of them as checkboxes. If you have a group of them, say 2, then you have to get the selected index of the 2 radio buttons, which is an array of values, from the DOM. That's what the [0] is for.
I was about to leave tor the night and sleep, but wanted to help a little more if possible. I can tell your not that familiar with Jquery. If you have an update panel on the page, this won't work after using the update panel once, because the DOM unloaded.
<script language="JavaScript" type="text/javascript">
$(document).ready( function() {
$('[id*="radbutSelector"]').change( function(event) {
confirmDelete(event);
});
});
function confirmDelete(event) {
var newradio= $("input[name='pick_up_point']:checked")[0];
if (newradio===currentradio)
return;
if (confirm('Address details will be cleared. Continue?')) {
clearInputFields();
currentradio= newradio;
} else {
currentradio.checked= true;
}
}
</script>
|
|
|
|
|
The system currently has a few users, created from the login feature used with mvc3 razor. how Can I assign one of these users to the administrator?
thanks
|
|
|
|
|
in my Get/Index view I am posting to my Post/Index method in the holidayController. So i am posting over the UserID, how can I use this to access the userName?
Iv tried
public ViewResult Index(int userID, string userName)
{
Person person = new Person();
person.Id = userID;
userName = person.name;
}
This is flashing up cant be null for person.name?
|
|
|
|
|
Where is the user ID coming from? Do you have a database and a model (LINQ To SQL or EF)? If so, I believe you would just use a query to retrieve the Person entity where the ID matches the userID parameter. Then you could assign person.Name to the userName variable.
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
Hi,
try this:
public ViewResult Index(int userID, string userName)
{
Person person = new Person(userID);
//this assigns person.Id to the user Id
//person.Id = userID;
//i want to assign name of person to the string userName
userName = person.name;
}
and you should define the class Person with id:
public Person(int id)
{
//get the person from DB or ...
_name = "data from DB";
}
Comm100 - Leading Live Chat Software Provider
-- modified 28-May-14 1:47am.
|
|
|
|