|
In Global.asax file write the following code
Application["counter"]=0
Now write the code on the form load
Application["counter"]= (int)Application["counter"] + 1
Label1.text = "You are visitor no = " + Application["counter"]
Enjoy
|
|
|
|
|
Hi all
Can any one please tell me the Error on this Iam unable to find it
CODE :
--------
TextBox1.Attributes.Add("onmouseover", "Form1.TextBox1.value = 'OK',Form1.submit()")
---------
when mouseover on the textbox
The page is submiting no.of times
But i want submit only ones
How can i give only 1 Form1.submit on mouseover
THX
Keerthi
|
|
|
|
|
TextBox1.Attributes.Add("onmouseover", "Form1.TextBox1.value = 'OK',Form1.submit()")
write a function in javascript at client side for Form1.TextBox1.value = 'OK',Form1.submit()" and call that function with Attributes.Add
for example, let assume that ur javascript name is 'xyz' and call this from serverside like
TextBox1.Attributes.Add("onmouseover", "xyz()")
Thanks
Bhasker P
|
|
|
|
|
i want calculate page by page the sum of records that are in datagrid
how can i do this.(i want calculate the sum of each page in end of page in datagrid)
|
|
|
|
|
Dim count as int
count = (current page index - 1) * (Number of records per page) + (Number of records current page)
Hope this helps
Chinna Srihari
Tech Lead, Capgemini
|
|
|
|
|
excuse me : what is count???
|
|
|
|
|
Count is to hold the no of recs up to the current viewing page.
suppose we have 10 pages in the drid and 5 recs per page.
And i am in the 6 th page so
Count = (6-1) * 5 + corrent page records
|
|
|
|
|
Just wondering if anyone can shed some light on the following:
Been coding in ASP.NET 2.0 for a few months now and I like it although
combining it with a 3 teir OO system can be annoying at times as the
amount of online help is minimal.
I have an issue with an objectdatasource and how to use a milti select
listbox as a control parameter.
<asp:listbox id="lstKeywords" selectionmode="Multiple" runat="server"></asp:listbox>
<asp:objectdatasource id="odsSearch" runat="server"
typename="Business.BLL.learningObject" selectmethod="SearchLearningObjectsWrapper">
<!-- Note that the following parameter may be wrong I just put one here to try and explain -->
<selectparameters>
<asp:controlparameter controlid="lstKeywords" defaultvalue=""
name="sKeywords" propertyname="SelectedValue" type="String" />
</selectparameters>
</asp:objectdatasource>
The <asp:controlparameter controlid="lstKeywords" only takes
SelectedValue not "selected valueS".
I want to be able to select more than 1 item from my listbox then pass
this ideally as List<items> to my business layer.
Even if I have to pass a string array this would be ok.
I even tried writing a custom parameter but could not get it to work.
Thanks
Russ
|
|
|
|
|
Hi there,
Because the SelectedValue[^] property of the ListBox always returns the first item value or empty even the control supports multiple selection, so you cannot use the ControlParameter in this case to get all the selected values to pass to the Select method. There are two options which you can try:
+ Use the general Parameter instead of the ControlParameter , you then create an event handler for the Selecting event of the ObjectDataSource. In the handler, you can manage to get all the selected values from the ListBox control, then pass to the InputParameters collection.
+ Use the FormParameter instead of the ControlParameter , and specify the name of the ListBox in the FormField property. Basically, if the client selects multiple values, the submitted data will contain all the selected item values which are seperated by the comma.
|
|
|
|
|
I open the ASPX page using the "showModalDialog" function, but the problem I am having is that it does not run the Page_Load method of the contained ASPX when the modal form is closed. I need to this to run to refresh the datagrid on the webform.
Any opinions on this issue??
Buchi
|
|
|
|
|
You can wait for the return value of the showModalDialog[^] method on the main page, then refresh the page after the dialog is closed.
|
|
|
|
|
For this u need to submit parent window ...........
|
|
|
|
|
what is the difference between < INPUT type=hidden > and viewstate? 2. what is diffgram? 3. What are the constraints available on a SQL SERVER table. 4. What are the difference between typed and untyped datasets. 5. what is typed and untyped in c# 6. what are the disadvantages of web service. 7. How the searches are handled by Google 8. what is web 2.0 9. Based on which property a (sql) transaction works? 10. what are the difference between web service and remoting? In which scenarios u will go for webservice & remoting?
|
|
|
|
|
Can't believe that all got an answer...
|
|
|
|
|
what should i do that the page be not refresh when i click the button in asp.net(c#)
is it possible?????????
|
|
|
|
|
use the ISPostBack
Rizwan Afsar
Associate Member, Technical Team
IAP Company Ltd, Gurgaon
INDIA
www.iap-online.com
"A winner is not the one who never fails,
But one who NEVER QUITS"
|
|
|
|
|
i can not use ispostback for function pageloade()
i want when i click the page not move when it refresh.
|
|
|
|
|
Can you explain the scenario please
Chinna Srihari
Tech Lead, Capgemini
|
|
|
|
|
You better to use HTMLButton if you dont want to execute any server side code on clicking the button
cheers.
Ramesh.Kanjinghat
|
|
|
|
|
Dear All,
In brief, actually i am running my site on OS 2003 enterprise edition. Whan i enter the url http://localhost/TP45 , it gives message
"Service Unavailable". i am running IIS on port 80. i am also having Apache server on my machine, but i have stopped the Apache server service.
KIndly provide me the solution asap.
Best Regards
Raju Sharma
Raju Sharma
|
|
|
|
|
Hi guies,
I am new to Asp.Net.
I want something about ispostback method in detail.
Thanks in advance
|
|
|
|
|
|
supose you have a function that its name is cuurent date. when you wite this code:
if (!Ispostback)
{
current date()
}
the current date() function just one time be debug and when ever your form refresh it is not debuge
|
|
|
|
|
ASP.NET Session expires quite earlier even after changing the Application pool in IIS to 2 hours
valluri
|
|
|
|
|
try it with by setting the sliding attribute for session
Chinna Srihari
Tech Lead, Capgemini
|
|
|
|