|
You format a column to output a link. did you try google for examples ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
How to pass values from javascript to server-side
|
|
|
|
|
Using a hidden input field.
|
|
|
|
|
|
1 - put a server hidden field in your page
2 - write the name of the field as a variable through to javascript, so you have the client side Id
3 - use document.getElementById to find the Id, and then set the value in JS
4 - on postback, read it from the hidden field.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
<input type="hidden" name="txtHidden" id="txtHidden" runat="server">
document.getElementById("txtHidden").value = "Set your value here" You can use txtHidden.Text on server side to get the value.
|
|
|
|
|
runat=server won't change the id ? I see it's not a server control, but still, I did not know that.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: runat=server won't change the id
It will, only if the control is in a container(like panel etc). In such cases, it prefixes the container id with the control id to make the name unique. In normal cases, it won't.
|
|
|
|
|
Hello everyone!
I need to ask for an advice on my dilemma... I have a form with a dropdownlist, that is being filled with data from the database, and a textbox that is disabled.
What I want to do is if the user select the value 'Other' from the dropdownlist, the textbox will be enabled without having to submit the form.
I read from a forum that i can use a javascript for this, but since I'm really new to javascript I want to ask for your suggestions and/or expert opinions on how can I proceed on this one.
Thanks in advance!
modified on Thursday, February 26, 2009 1:40 AM
|
|
|
|
|
jalandoonkNEWBIE wrote: I read from a forum that i can use a javascript for this
Handle the onchange event.
1 - Use var obj = document.getElementById(YourDropdownId) to get the dropdown list
2 - obj.options[obj.selectedIndex].text to get the selected text.
Do the necessary checking and enable/disable textbox.
|
|
|
|
|
Ok, I already solved my 'problem', and for the benefit of those who want to know what I did here is may javascript:
function ValidateInfo(DropDownID)
{
var form = document.forms[0];
intLength = form.elements.length;
for (var ctr=0; ctr<intlength;> {
var element = form.elements[ctr];
var elementName = element.name;
if (elementName.indexOf(DropDownID) > 0)
{
strGroupID = element.selectedIndex;
if (strGroupID == (element.length - 1))
{
TextEnabled = false;
}
else
{
TextEnabled = true;
}
break;
}
}
for (ctr=0; ctr<intlength;> {
var element = form.elements[ctr];
var elementName = element.name;
if (elementName.indexOf('txtNewGroup') > 0)
{
element.disabled = TextEnabled;
break;
}
}
}
and called it within the page_load function.
|
|
|
|
|
hi
I want to bind my grid but the dataset returned from web service contains lakhs of records. so it takes lots of time to load. Is there any way to distribute the dataset?
or any other solution.
Thanks in advance
|
|
|
|
|
lakhs is not an English word. It means a lot tho, right ?
If you can't change the dataset, then you have a problem. You probably want to cache the data. Ideally, your data source should return paged data, not tons of data you go on to not show b/c of paging in the control.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
How paged data be returned by data source?
I want paging done like Google or codeproject as both are fetching millions of records.
Thanks for the reply.
|
|
|
|
|
Write your data source so you tell it what page number to display and how many records are in a page.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
i download the "Sending SMS using .NET through a Web service
By Manoj Kumar C" project but it didnt work.so plz tel me the requirement of project and how to execute that project successfully.
|
|
|
|
|
WOW! You have to ask on that article's discussion board, not here.
|
|
|
|
|
You're an idiot. Sorry.
Did you think that everyone who writes articles and answers here all sits in one big room, spending our life doing your job ? This place exists because of volunteers. The article has a place to ask questions of the author.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi all,
Can any one tell me how can we encrypt a text in c#??
|
|
|
|
|
We usually use the built in cryptography classes ( hint: google cryptography )
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
can u give me a link for examole...???
|
|
|
|
|
|
|
Hi,
I want to restrict the user to login with the same username/password in
more than one system in the same ipaddress. Can anyone give me an idea.
Thanks
|
|
|
|
|
Store in your DB if they are logged in. Of course, you need a timeout mechanism to do this.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|