It shows the limitations when researching. example: You are having a difficult time of finding a sample. It is somewhat like you are given a little time and you need more time to finish the work properly. Of course, limitations is not only about time, but other things too.
there are 6 objects.
1. server
2. session
3. application
4. ObjectContext
5. Response
6. Request
Example:
If (my.textbox1.text = my.textbox2.text) Then ...
. However storing the session state InProc has its own share of limitations. Some of these are
- With each app domain restart Session state is lost
- Process restart will result in loss of Session state data
- If considerable amount of data are stored in Session state, memory consumption for the process may increase to the point of experiencing issues due to high memory. Therefore, the amount of data being stored in Session state and the time frame during which these data need to be stored should be limited as much as possible.
- In case one wants to implement InProc Session state in a web farm scenario ensure we have sticky sessions enabled for the web farm as it involves storing of the session data among processes hosted on multiple servers.
The AdRotator is an ASP.NET control that is used to provide advertisements to Web pages. The AdRotatorcontrol associates with one or many advertisements, which randomly displays one by one at a time when the Web page is refreshed. The AdRotator control advertisements are associated with links; therefore, when you click on an advertisement, it redirects you to other pages.
The AdRotator control is associated with a data source, which is normally an xml file or a database table. A data source contains all the information, such as advertisement graphics reference, link, and alternate text. Therefore, when you use the AdRotator control, you should first create a data source and then associate it with the AdRotator control.
we r using 3 textboxes and ond one result one then we can write this code like
int firstNumber, secondNumber, result;
firstNumber = Convert.ToInt32(txtFirstNumber.Text.Trim());
secondNumber = Convert.ToInt32(txtSecondNumber.Text.Trim());
result = firstNumber + secondNumber;
txtResult.Text = Convert.ToString(result);
ZIP - zicxac inline pin
that format the decreases the size 1/3 of actual size.(rel:computers)
Base class can access members functions of derived class if they were declared as 'virtual' in base class and have same prototype. For this type of access, a pointer to base class is required.
class Parent
{
//data members and constructor here
virtual void Func1()
{
cout<<"hello from Parent\n";
}
};
class Child : public Parent
{
//data members and constructor here
void Func1()
{
cout<<"Hello from Child\n";
}
},
int main()
{
Parent *pParent;
pParent = new Parent();
pParent->Func1();
pParent = new Child();
pParent->Func1();
..
..
..
}
OutPut:
Hello from Parent
Hello from Child
The pointer to base class must be initialized to some instance of the derived class, before accessing its member function.
The above is specific to C++. In Java, a base (parent) class can access any methods (but not Class variables) of a subclass ONLY if that subclass overrides the method declared in the parent class.
Thus:
public Parent {
// class variables
private int i;
// class methods
public int myMethod () {
return i;
}
}
public Child {
// class variables
private float k;
// class method
// overrides Parent
public int myMethod () {
return (int) k;
}
// overload Parent
public int myMethod (float j) {
return (int) (j * k);
}
}
Thus, for:
Parent p = new Parent();
Child c = new Child();
Parent n = (Parent) c;
// assume we assign i = 10 in 'p', and k = 5.0 in 'c'
These work fine:
p.myMethod() returns 10
c.myMethod() returns 5
n.myMethod() returns 5
c.myMethod(4.0) returns 20
These don't, and throw a methodNotFound error:
p.myMethod(4.0)
n.myMethod(4.0)
The error is thrown because the Parent definition does not include a method with a signature that takes a floating point value as an argument. This happens even in the case of 'n', which, while actually an object of type Child, is being treated as an object of type Parent in this context, so only the Parent signatures are valid.
Note the above only applies to instantiated objects, so the Class definition of the Parent can make no references of any kind to that of a subclass's definition. In the above example, class Parent could never refer to variable k of subclass Child in any way, nor could it refer to the overridden method.
• When used appropriately, a layered design can lessen the overall impact of changes to the application.
•Allows you to modify a component without disturbing the next one
•Design scalable and maintainable web applications rapidly
•Increase security level of an application
Multiple inheritance, as the name 'multiple' suggests, is one where more than one(multiple) super class is inherited by one sub-class. It can be represented as:
A B C
\ | /
D
On the other hand, in case of multilevel inheritance; the superclass is inherited by a sub-class which is in turn inherited by another class leading to the different level. It can be represented as:
A
|
B
|
C
However in asp, multiple inheritance is not supported.
Process --1------------m-- Threads
1 process to many threads
Bring up your Task Manager (if you are using a windows), Performance tap, you can see the number of process and the number of threads, usually the number of threads is a lot higher than the number of processes.
In Java:
sum = 0;
for (i = 2; i <= 50; i += 2)
sum += i;
Similar (perhaps identical?) in C.
We can store images as well as files in database. Use this code for Onclick event of upload button :-
protected void btnUpload_Click(object sender, EventArgs e)
{
string strImageName = txtName.Text.ToString();
if (FileUpload1.PostedFile != null && FileUpload1.PostedFile.FileName != "")
{
byte[] imageSize = new byte[FileUpload1.PostedFile.ContentLength];
HttpPostedFile uploadedImage = FileUpload1.PostedFile;
uploadedImage.InputStream.Read(imageSize, 0, (int)FileUpload1.PostedFile.ContentLength);
// Create SQL Connection
SqlConnection con = new SqlConnection();
con.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
// Create SQL Command
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "INSERT INTO Images(ImageName,Image) VALUES (@ImageName,@Image)";
cmd.CommandType = CommandType.Text;
cmd.Connection = con;
SqlParameter ImageName = new SqlParameter("@ImageName", SqlDbType.VarChar, 50);
ImageName.Value = strImageName.ToString();
cmd.Parameters.Add(ImageName);
SqlParameter UploadedImage = new SqlParameter("@Image", SqlDbType.Image, imageSize.Length);
UploadedImage.Value = imageSize;
cmd.Parameters.Add(UploadedImage);
con.Open();
int result = cmd.ExecuteNonQuery();
con.Close();
if (result > 0)
lblMessage.Text = "File Uploaded";
GridView1.DataBind();
}
}
Merged documents can be very useful ! Suppose you were running a sports club of 200 people, and you wanted to send them all the same letter... You could use a merge document to print the letter out, with each persons details merged into it.
Internet Information Services (IIS) for Windows® Server is a flexible, secure and easy-to-manage Web server for hosting anything on the Web and deliver content through the Internet.
This can be done with a little javascript. Here's an example <html>
<head>
<script type="text/javascript" language="javascript">
function addNewItem()
{
// Retrieve the elements from the document body
var textbox = document.getElementById('MyTextbox');
var listbox = document.getElementById('MyListbox'); // Now we need to create a new 'option' tag to add to MyListbox
var newOption = document.createElement('option');
newOption.value = textbox.value; // The value that this option will have
newOption.innerHTML = textbox.value; // The displayed text inside of the <option> tags // Finally, add the new option to the listbox
listbox.appendChild(newOption);
}
</script>
</head> <body> <input id="MyTextbox" type="textbox" />
<input type="button" value="Add Item" onclick="javascript:addNewItem()" /> <br /><br /> <select id="MyListbox" size="10">
<option value="apples">Apples</option>
<option value="oranges">Oranges</option>
<option value="bananas">Bananas</option>
</select> </body>
</html>