|
I want the vaue in string variable from java script function in to the code behind. please find me solution. thanks.
|
|
|
|
|
Create a hidden field in your page and use that to access the values in the code behind.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Just I would like to add on above post, you can also coockies
Set the value in Hidden variable/Coockies from javascript method
then use it from code behind
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
i need to create a web interface to control (enter the multicast address, set playlist,start/stop streaming) the multicast settings of the windows media services, in server 2003.so that an admin can log in from any machine in the network and control the main streaming server.
it is for my project and its very urgent.
can anyone help me we it?some tell me to go with a COM, but i have no idea how to do it.any alternatives?please, im desperate.
thank you
|
|
|
|
|
Hello Guys,
I need help in creating multicolumn Dropdown box like values ([ID](Primary Key) , [Description]) inside Gridview which will select value from different table in Gridview's Edit mode It should just Select [ID] value not [Description]) for Gridview.
Thanks in advance.
|
|
|
|
|
|
Hello all
I have a web site that includes ftpupload control.
Now this is my question: when others send files and pictures for me, How can I access them?
Do they goes to my internet host and I should Download them??? or they go to my hard drive directly and I shouldn't download them???
IS THERE ANYONE TO LINK ME TO A COMPLETE ARTICLE???
THANKS HIM...
|
|
|
|
|
Well, the answer is pretty obvious. Either you host your site locally, or your uploads end up on your server, and you have to download them from there.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hasani2007 wrote: Now this is my question: when others send files and pictures for me, How can I access them?
Do you mean how to access the FTP site? Just download the files using FTP and then see it.
If the server which has FTP site is your own computer, then you can see it inside your FTP site directory.
|
|
|
|
|
OHHH!
Files that will send for me may be more than 600mb. with dial-up connection HOW CAN I DOWNLOAD ALL OF THEM
|
|
|
|
|
But without downloading how could you get the files?
You can list the files using FTP list command but that will also list files that are corrupted during uploading.
|
|
|
|
|
Hello,
I think this is my first post here. But I've already used a lot of your codes here! Thanks a lot for them!
Now it's my turn to ask a question
Is it possible to get the serial number of the motherboard via ASP.NET? This would me interesting to send the license key of my software automatically.
If this is possible, can someone give me an exaple?
Thanks a lot!
Madmatt.
|
|
|
|
|
|
This information was very helpfull. But, if you have time to make it, can you make a class to do this?
|
|
|
|
|
_Madmatt wrote: if you have time to make it, can you make a class to do this?
About which class you are talking about ?
|
|
|
|
|
I think he wants you to write one ActiveX / Plugin which will get motherboard serial no of the client.
|
|
|
|
|
If you can't do your own work, you should advertise in the job section of the site and pay the person you expect to do it for you. This will also give you rights to expect the code to do exactly what you want, and to ask for changes if you need them.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I dont think its a good idea to use any external ActiveX / browser plugin. More you add this to your site, less the amount of users will visit your site.
|
|
|
|
|
I don't think ActiveX is a big problem? But my idea has some other problems. Just like this one: of they buy on another pc the license will not be accepted...
Thanks a lot for your help! I'll search another method for web-based registering.
Madmatt.
|
|
|
|
|
Hi..
///I m executing javascript function from codebehind (c#) as below
ClientScript.RegisterStartupScript(GetType(), "Check_Wrong_AnsString",
"Check_Wrong_AnsString('" + txtWrongAns1.Text.Trim() + "');", true);
////following is my javascript function.
function Check_Wrong_AnsString(args)
{
var AnsString = args;
if (AnsString.length < 1)
{
alert('Can not be blank');
return false;
}
}
//// i want to fetch javascript function's return value to codebehind.
thanks
By:
Hemant Thaker
|
|
|
|
|
From the function set value to some hidden variable, then access from codebehind !!
|
|
|
|
|
/////following way i m assigning to hidden field in javascript
function Check_Wrong_AnsString(args)
{
if (AnsString.length < 1)
{
alert('Can not be blank');
document.getElementById("ctl00_cnPlaHolaaa_Hidden_WrongAns").value = "false";
return;
}
}
////////aspx file
<asp:HiddenField id="Hidden_WrongAns" runat="server" value="true"/>
///////this is my codebehind file
ClientScript.RegisterStartupScript(GetType(), "Check_Wrong_AnsString", "Check_Wrong_AnsString('" + txtWrongAns1.Text.Trim() + "');", true);
string hh = Hidden_WrongAns.Value.ToString();
Response.Write(hh);
//////////but it writes "true" to browser (the default value we supplied at declaration of hidden field)
it should write "false" if function returns false.
please tell me if i have done wrong coding
thanks
By:
Hemant Thaker
|
|
|
|
|
Hemant Thaker wrote: <asp:hiddenfield id="Hidden_WrongAns" runat="server" value="true">
This is your server side control. You need to first get "ClientID"
var HClientID="<%=Hidden_WrongAns.ClientID%>";
var hidID=document.getElementById(HClientID).value = "false";
|
|
|
|
|
gives me javascript error on tracing as below
jscript runtime error :document.getelementId(...) is null or not an object
???????????? whats that
thx
By:
Hemant Thaker
|
|
|
|
|
Hemant Thaker wrote:
jscript runtime error :document.getelementId(...) is null or not an object
???????????? whats that
I dont know, what you are doing with getelementId ???
Try this :
.cs file code ::
protected void Button1_Click(object sender, EventArgs e)
{
ClientScript.RegisterStartupScript(GetType(), "Check_Wrong_AnsString", "SetServerValue()", true);
Response.Write(HiddenField1.Value);
}
Javascript ::
<script language="javascript">
var HClientID="<%=HiddenField1.ClientID%>";
function SetServerValue(args)
{
var hidID=document.getElementById(HClientID).value = "false";
}
</script>
ASPX :
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
<asp:HiddenField ID="HiddenField1" runat="server" />
Try and run this. This working fine !!
Hope this will help you. Let me know if u have any more issue !!
|
|
|
|