|
actually i want to save the image in a folder while i am using usercontrol .
and usercontrol have the fileupload control .
so it is not possible for me to save the image .
tell me .
|
|
|
|
|
Hello everybody,
Again an open question. If you use resource files, for example for localizing your app, what structure do you use? In a website there a multiple types of texts, labels near input fields, page titles, error messages, button texts, explanatory texts etc etc.
Do you have a subdivision in your resource files, ie: labels.resx, titles.resx etc, or do you put all the strings into one big resource file?
Is there a difference in performance between the two different structures?
Like to hear your ideas.
thanks,
Gidon
|
|
|
|
|
Hi all
I have a web user control where i have placed a radcombo and an external javascript isiri2901.js.
<%
@ Control Language="VB" AutoEventWireup="false" CodeFile="AutoComplete.ascx.vb" Inherits="Controls_AutoComplete" %>
<%@ Register Assembly="RadComboBox.Net2" Namespace="Telerik.WebControls" TagPrefix="radC" %>
<script language='javascript' type='text/javascript' src="../Scripts/isiri2901.js"></script>
<script type="text/javascript">
function ChangeTextDirection(obj)
{
var Name=document.getElementById('<%=RadAutoComplete.ClientID %>');
alert(name.Value);
return false;
}
</script>
<
radC:RadComboBox ID="RadAutoComplete" runat="server" Width="150px" Height="150px"Skin="ClassicGold" AllowCustomText="True" EnableLoadOnDemand="True"ExpandEffect="Fade" SkinsPath="~/RadControls/ComboBox/Skins" OnClientFocus="ChangeTextDirection(this)" EnableItemBindingExpressions="False" MarkFirstMatch="True"></radC:RadComboBox><asp:RequiredFieldValidator ID="cvalName" ControlToValidate="RadAutoComplete" Display="Dynamic" runat="server">*</asp:RequiredFieldValidator>
My issue is that iam not being able to return the client id of the radcombo. It is retuirning undefined. I need to return the ID and use it as a parameter to the JS. Please note that in the same aspx page i might have several web user controls and for each one of those i need to get the id and send it to the JS.
Any help and thanks in advance.
|
|
|
|
|
samerh wrote: function ChangeTextDirection(obj)
{
var Name=document.getElementById('<%=RadAutoComplete.ClientID %>');
You have already object of your combo control in function.
function ChangeTextDirection(obj)
{
alert(obj.Value);
return false;
}
Regard
Khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Already tried it also. Giving not defined also. Starnge!!!!!!1
|
|
|
|
|
Check out ID of control in view source file.What is it?
please don't forget to vote on the post that helped you.
|
|
|
|
|
In source it is like this
<input type="text" id="txtFirstName_RadAutoComplete_Input" name="txtFirstName$RadAutoComplete_Input" value="" class="ComboBoxInput_ClassicGold" style="width:150px;" tabindex="3"></input>
|
|
|
|
|
Okay.
Now check ID in function like this
alert(obj.id);
If it gives undefined then try with
alert(document.getElementById('txtFirstName_RadAutoComplete_Input').value);
Regard
Khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Imran Khan Pathan wrote: alert(obj.id);
It gives undefined i already tried it.
Imran Khan Pathan wrote: alert(document.getElementById('txtFirstName_RadAutoComplete_Input').value);
This could be true if i know the name of each control, but note that this is a web user control that iam dropping in the page several times sometimes. In this special case it is 'txtFirstName_RadAutoComplete_Input' but in the same page there are 2-3-4 more controls. Is there a general methos to read the radcombo in the web user control instead of referring to it in each page alone.
thanks
|
|
|
|
|
samerh wrote: var Name=document.getElementById('<%=RadAutoComplete.ClientID %>');
samerh wrote: alert(name.Value);
Name or name?
|
|
|
|
|
NO, Name in both & still not working.
Thanks anyway
|
|
|
|
|
hello friends,
I have used the global static members in .cs like below
public static DataTable dt=new DataTable();
I have adding some dynamic columns and rows in above DataTable Object.
The problem arises , when i login into another machine and access same page the content of the datatable is added in both Pages. When I modify
any column respectively the changes shown on different machine.
I want to know that how can i overcome this problem, or how can i lock the public static members in asp.net.
Please if anyone know solution the send as soon as possible....
thank you.
|
|
|
|
|
gurdeep_677 wrote: The problem arises , when i login into another machine and access same page the content of the datatable is added in both Pages. When I modify
any column respectively the changes shown on different machine.
static variables will have a life time till the application domain unloads. This is why you are getting same results on both machines. If you could tell us what you are trying to do, we will have some better suggestions.
|
|
|
|
|
I know about the scope of static variable, consider the following code i thing u understand that what i need
//Declare on Top
public static DataTable dt = new DataTable();
//on page load
{
dt.Columns.Add("HName");
dt.Columns.Add("fee_type");
dt.Columns.Add("fee");
dt.Columns.Add("disc");
dt.Columns.Add("net");
}
//DataList itemCommand Event
protected void drphead_item(object source, DataListCommandEventArgs e)
{
if (e.CommandName == "add")
{
lblerror.Visible = false;
DataRow dr = dt.NewRow();
LinkButton lb = new LinkButton();
lb = (LinkButton)e.Item.FindControl("LinkButton1");
lb.Enabled = false;
dr[0] = lb.Text;
dr[1] = "Yearly";
dr[2] = 0.00;
dr[3] = 0.00;
dr[4] = 0.00;
dt.Rows.Add(dr);
dlFeeHead.DataSource = dt;
dlFeeHead.DataBind();
}
Every time when user clcik on linkbutton (which is into the datalist control) accordingly the new DataRow is created it run perfactly, but the problem is occured when application run on two or more machine which i explained before....
If u have some solution then please reply thnks in advance....
|
|
|
|
|
gurdeep_677 wrote: static
Remove static .
gurdeep_677 wrote: I know about the scope of static variable
If you where knowing that, I am sure you don't write these code.
|
|
|
|
|
I know about the scope of static variable, consider the following code i thing u understand that what i need
//Declare on Top
public static DataTable dt = new DataTable();
//on page load
{
dt.Columns.Add("HName");
dt.Columns.Add("fee_type");
dt.Columns.Add("fee");
dt.Columns.Add("disc");
dt.Columns.Add("net");
}
//DataList itemCommand Event
protected void drphead_item(object source, DataListCommandEventArgs e)
{
if (e.CommandName == "add")
{
lblerror.Visible = false;
DataRow dr = dt.NewRow();
LinkButton lb = new LinkButton();
lb = (LinkButton)e.Item.FindControl("LinkButton1");
lb.Enabled = false;
dr[0] = lb.Text;
dr[1] = "Yearly";
dr[2] = 0.00;
dr[3] = 0.00;
dr[4] = 0.00;
dt.Rows.Add(dr);
dlFeeHead.DataSource = dt;
dlFeeHead.DataBind();
}
Every time when user clcik on linkbutton (which is into the datalist control) accordingly the new DataRow is created it run perfactly, but the problem is occured when application run on two or more machine which i explained before....
If u have some solution then please reply thnks in advance...
|
|
|
|
|
gurdeep_677 wrote: I know about the scope of static variable
gurdeep_677 wrote: but the problem is occured when application run on two or more machine which i explained before....
Well, that's what static MEANS. Why are you making it static ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
I'd suggest reading a book on C#. Your code is doing exactly what you're asking it to do.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
dear i know about the static members but i have some problem, consider the following code if found any solution so please reply thanks in advance....
public static DataTable dt=new DataTable();
//on page load
dt.Columns.Add("HName");
dt.Columns.Add("fee_type");
dt.Columns.Add("fee");
dt.Columns.Add("disc");
dt.Columns.Add("net");
//DataList ItemCommand Event
protected void drphead_item(object source, DataListCommandEventArgs e)
{
if (e.CommandName == "add")
{
lblerror.Visible = false;
DataRow dr = dt.NewRow();
LinkButton lb = new LinkButton();
lb = (LinkButton)e.Item.FindControl("LinkButton1");
lb.Enabled = false;
dr[0] = lb.Text;
dr[1] = "Yearly";
dr[2] = 0.00;
dr[3] = 0.00;
dr[4] = 0.00;
dt.Rows.Add(dr);
dlFeeHead.DataSource = dt;
dlFeeHead.DataBind();
}
|
|
|
|
|
I don't see what the problem is. If you make it static, it's the same for all pages. That's what static means. Why are you using static and what is your specific problem ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
hello sir
i m using javascript function for displaying large image(shown in datalist)...my function is
function ShowToolTip(con)
{
document.getElementById("div_img").style.visibility = "visible";
document.getElementById("img_tool").src =con.src.replace("SmallPic","BigPic");
document.getElementById("div_img").style.left = event.clientX ;
document.getElementById("div_img").style.top = event.clientY ;
document.getElementById("div_img").style.zIndex = "0";
}
and on mouseout...i use another function ie
function hideToolTip()
{
document.getElementById("div_img").style.visibility = "hidden";
}...
but the problem is this onmouseover of another image it first display the first image for some seconds and then the current image...so i want to use loading like http://www.templates.com/[^] ...please help me...how to solve this problem...
u can check my problem here http://www.eleegance.com/Default2.aspx?id=1[^]
|
|
|
|
|
You can use setTimeout function in javascript.
try this script
function ShowToolTip(con)
{
document.getElementById("img_tool").src =con.src.replace("SmallPic","BigPic");
document.getElementById("div_img").style.left = event.clientX ;
document.getElementById("div_img").style.top = event.clientY ;
document.getElementById("div_img").style.zIndex = "0";
setTimeout("Loading()",1000);
}
function Loading()
{
document.getElementById("div_img").style.visibility = "visible";
}
Regard
khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
i have done this like..
document.getElementById("img_tool").onLoad = setTimeout("imageLoaded()",3000);
function imageLoaded()
{
document.getElementById("img_tool").src="pic/load.gif";
}
but its not working...please help me...
|
|
|
|
|
Neetu Maheshwari wrote: document.getElementById("img_tool").onLoad = setTimeout("imageLoaded()",3000);
If above line is out of function then it will not work.
try with my script
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi,whenever I am using update panel,i can not dynamically set focus to the control I want to.Should I use any Java Script?Can anybody help me out???Thanx in advance...
|
|
|
|