|
By my understanding, it depends on the container that you use. If the static variable is contained in a instantiable class then the variable is not shared across users. If it is contained in a static class then it is shared across users. This is just my understanding and there is every possibility that I might be wrong.
A safer and a much cleaner approach to this problem would be to put the datatable in the page's viewstate. This way the datatable along with the changes is available as long as the page is alive and you get peace of mind!
HTH!
|
|
|
|
|
Hi everybody,
I´m trying to deal with a little problem using Certificates, I have a ASP.NET Website (VB) with the traditional User/Password login. Now I want use SmartCards attached to the Client-Machines. I saw few ASP.NET websites poping up some Windows Dialog for Certificate Selection (NOT a Windows Chalenge Login) it´s just a list of certificates inside the SmartCard CHIP.
Does anyone know how to ask for that Dialog using server side?
HouseofDev
Angelo Bestetti
|
|
|
|
|
hi!
Did you get an answer for this question about the smart card dialog?
Take care,
Peter
|
|
|
|
|
I am trying to extend the GridView. I am unable to find out the control placed in the template field and its binding. Is there a way to get to know that? For instance I add a template field as below in the gridview:
< asp:TemplateField>
< HeaderTemplate>
< asp:Label ID="lblHeader" runat="server" Text="TemplateColumn">
< /asp:Label>
< /HeaderTemplate>
< ItemTemplate>
< asp:Label ID="lblCol1" runat="server" Text='<%# Bind("col2") %>'>
< /asp:Label>
< /ItemTemplate>
< /asp:TemplateField>
Now, I need to identify
1. the template column from the column collection of the gridview
2. the datafield I use for binding.
3. the control I place inside the template field
"No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
modified on Wednesday, January 27, 2010 10:34 AM
|
|
|
|
|
Hi Peoples,
I am doing an asp website along with ajax .
actually i am using an asp update panel, in which i am updating some informations based on conditions,
that panel is reffered to as the ajax pop up pop up control control id, and the target control id is a button
.
it works fine in my local host
here my problem is with the hosted server,
if i click the button it is updating the panel and the pop up is showing, but
the mean time the user is unable to feel what is going on as the page is simply sitting, after 30 secs the pop up is coming.
i want to show an progress bar or image kind of thing,
How to do that, ( as i already try to show some image(like loading) in the ajax pop in an seperate update panel, its also showing same response)
help me
|
|
|
|
|
|
Hi
"Sys.WebForms.PageRequestManager" class manages partial-page updates of server UpdatePanel controls in the browser. There are two events which handles before an request made and after completing the request in the browser. These are
1. Sys.WebForms.PageRequestManager beginRequest Event : Raised before processing of an asynchronous postback starts and the postback request is sent to the server.
2. Sys.WebForms.PageRequestManager endRequest Event: Raised after an asynchronous postback is finished and control has been returned to the browser.
You can simply use this events to show and hide your progress bar. See code below
<script type="text/javascript" language="javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function BeginRequestHandler(sender, args)
{
var elem = args.get_postBackElement();
ActivateAlertDiv('visible', 'AlertDiv', elem.value + ' processing...');
}
function EndRequestHandler(sender, args)
{
ActivateAlertDiv('hidden', 'AlertDiv', '');
}
function ActivateAlertDiv(visstring, elem, msg)
{
var adiv = $get(elem);
adiv.style.visibility = visstring;
adiv.innerHTML = msg;
}
</script>
Cheers
Prosanta Kundu
modified on Wednesday, January 27, 2010 11:18 PM
|
|
|
|
|
Hi thanks for all who helped me, and for spending the time for me, even with codes..
i have done with the asp:update progress as i saw that as first reply..and i am testing the same, i will check with this java function also
thanks a lot.
|
|
|
|
|
onitemcommand event of the datalist control not firing
|
|
|
|
|
i can create rdlc report programatically, but i want to know how to create programatically dataset. if any one know how to create programaticaly dataset for rdlc reports please help me.
|
|
|
|
|
|
I have populated a dropdown control.
The items inside the dropdown are: "hello", "you", "there"
based on a few retrieved items from the database, I would like the correct item in the dropdown to be selected.
For example:
string strValue = "you";
ddlgvSources.selectedItem.Text = strValue;
The problem here is that the text in strValue over writes the value inside the dropdown, so when I click on the dropdown to see all the items, it shows:
you
you
there
Do you know why?
Thanks
|
|
|
|
|
You are trying to replace the text instead of selecting the required one.
You have to find the correct list item using the method FindItemByText or FindItemByValue of DropDownand then Select it.
ListItem item;
ddl.SelectedIndex = -1;
item = ddl.Items.FindByText("hello");
if (item != null) item.Selected = true;
|
|
|
|
|
ListItem item=DropDownList1.Items[DropDownList1.SelectedIndex];
DropDownList1.Items.Remove(item);
DropDownList1.Items.Insert(0, item);
|
|
|
|
|
And how does this solved the OPs problem?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Try this:
ddlgvSources.SelectedValue = strValue;
|
|
|
|
|
|
Hi,
This is not firing in Mozilla firefox..
if (document.selection)
{
alert("abc");
}
what is the equalant function for Firefox can u clear me plz.....
Regards,
kannak
kannak
|
|
|
|
|
|
Hi,
I tried that link ..its working fine in IE but not working in Firefox..
my problem is also like that ...the Javascript function is working in IE
but not working in FIREfox
regards,
kannak.........
kannak
|
|
|
|
|
Hi
Here is your code below
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Selection Test Page</title>
<script language="javascript" type="text/javascript">
function foo() {
var selObj = window.getSelection();
alert(selObj);
var selRange = selObj.getRangeAt(0);
}
</script>
</head>
<body onmouseup="foo()">
Select some of the text in document. Select text and see the result.
</body>
</html>
Cheers
Prosanta Kundu
|
|
|
|
|
Hi,
I will clearly explain my requirement , Listbox and textbox in my page..listbox having 5 rows...when i select any data from the listbox , the selected data should copied and pasted to the Textbox...for i use Javascript method ...its working fine in IE but not working in Firefox..the javascript method as follows..can u please check it out why its not working in Firefox..
function insertTextFun() {
if (document.selection)
{
document.getElementById("<%= txtExprsn.ClientID %>").focus();
var sel = document.selection.createRange();
var varname = document.getElementById("<%= lsbFunction.ClientID %>");
sel.text = varname.options[varname.selectedIndex].text;
}
else if (txtExprsn.selectionStart || txtExprsn.selectionStart == '0') {
var startPos = txtExprsn.selectionStart;
var endPos = txtExprsn.selectionEnd;
txtExprsn.value = txtExprsn.value.substring(0, startPos) + lsbFunction[lsbFunction.selectedIndex] +
txtExprsn.value.substring(endPos, txtExprsn.value.length);
}
else
{
txtExprsn.value += lsbFunction[lsbFunction.selectedIndex];
}
Am calling this function onclick method of the listbox..
Thanks in Advance,
kannak.......
kannak
|
|
|
|
|
Hi
here is your code
<pre>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Selection Test Page</title>
<script language="javascript" type="text/javascript">
function insertTextFun() {
if (document.selection)
{
document.getElementById("txtExprsn").focus();
var sel = document.selection.createRange();
var varname = document.getElementById("lsbFunction");
sel.text = varname.options[varname.selectedIndex].text;
document.getElementById("txtExprsn").focus();
}
else if (window.getSelection()) {
var input = document.getElementById("txtExprsn");
var varname = document.getElementById("lsbFunction");
var start = input.selectionStart;
var end = input.selectionEnd;
var insText = input.value.substring(start, end);
input.value = input.value.substr(0, start) + varname.options[varname.selectedIndex].text + input.value.substr(end);
input.selectionStart = start;
input.selectionEnd = (start + varname.options[varname.selectedIndex].text.length);
input.focus();
}
else
{
txtExprsn.value += lsbFunction[lsbFunction.selectedIndex];
}
}
</script>
</head>
<body >
<select id="lsbFunction" size=5 onclick="insertTextFun()">
<option value="function1">function1</option>
<option value="function2">function2</option>
<option value="function3">function3</option>
<option value="function4">function4</option>
<option value="function5">function5</option>
</select>
<textarea id="txtExprsn" rows="10" cols="40">
This is an example of [bla bla bla] selection.
</textarea>
</body>
</html>
</pre>
Cheers
Prosanta Kundu
modified on Thursday, January 28, 2010 5:04 AM
|
|
|
|
|
Hi,
Thanks u for your response, i will use this code......
regards,
kannak......
kannak
|
|
|
|