|
Hi All...
I am making an application which require to write news in mixed font. I am using Freetextbox for this purpose. Can anyone plz guide me how to get the support for arabic font, how to install it and how to use it.
Please guide me if there is any other resource as well.
Thanx
Bye
|
|
|
|
|
Hi,
I have two buttons in my page. one button is to navigate for the next page and one is for previous page.
I want to trigger those buttons using right and left direction keys in key board.. Is there anyway to trigger this Event?
Santhapur
|
|
|
|
|
Place this code on Page_Load()
form1.Attributes.Add("onkeydown", "var btnLeft=document.getElementById('" + <big>btnLeft.ClientID </big>+ "');var btnRight=document.getElementById('" + <big>btnRight.ClientID</big> + "');if(btnLeft && event.keyCode==37){btnLeft.click()};if(btnRight && event.keyCode==39){btnRight.click()};}")
btnLeft and btnRight are the IDs of your left/right buttons.
|
|
|
|
|
I am using image,label and button in update panel.My page inherit master page.I have made button height and width "0". so that button don't show in page. i'm calling a javascript function show() from anchor tag onclick(). anchor tag is not in update panel.
In show() i made the button click()
like this :--
document.getElementById('ctl00_ContentPlaceHolder1_Button1').click();
and in button1_click()
I am filling label and image from data base.
Label data and image show in browser IE(6.0) perfectly.But in browser Firefox mozila and in opera label data only show.Image not showing.
Plz help me as soon as possiable.
Thanks in advance.
Thanks & Best Regards
Ajita Kumar Satpathy
|
|
|
|
|
Ajita Kumar Satpathy wrote: I have made button height and width "0". so that button don't show in page.
Bad Idea. Why you cant give visible property to false or Style="display:none;"?
Ajita Kumar Satpathy wrote: document.getElementById('ctl00_ContentPlaceHolder1_Button1').click();
You can call server side function in JS.
Google[^]
Ajita Kumar Satpathy wrote: But in browser Firefox mozila
Install Firebug[^] And find out problem
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
fiend,
this is not my question. Please understand the question carefully.
My page inherit master page.I've a update panel. Inside update panel there is an image control, a label, a button (say Button1). There is an anchor tag outside the update panel. My motto is to show image (in image control) & data (in label) on clicking the link(anchor tag). For this I've called the onclick() event of the Button1 in anchor tag ike this :--
document.getElementById('ctl00_ContentPlaceHolder1_Button1').click();
And code is written in Button1_Click event.Actually there is no necessity of Button1 to show to user. So I've made its height & width to zero. (Your suggestion is right i.e. make visible false of the Button1).
When I click the the anchor tag, in IE, both data & image is displayed. But in Firefox Mozilla, only data is displayed. Image is not displayed. This is actual problem.
Thanks in advance
Thanks & Best Regards
Ajita Kumar Satpathy
|
|
|
|
|
i have this code, when i run this page, this reader dont bring the first record. i ran this sql(SELECT) on the sql database and runs fine, and if i put the seme SELECT in a Sqldatasource and bind the griview, it works fine too. what is wrong with this reader?
******************
any idea.
THIS WORKS
SqlDataSource1.SelectCommand = "SELECT products.pid, products.pname, flavors.fl_name, product_flavors.flavor_icon FROM product_flavors LEFT JOIN flavors ON product_flavors.flavorsid = flavors.flavorsid LEFT JOIN products ON product_flavors.pid=products.pid WHERE products.pid = 84"
ProductListView.DataSource = SqlDataSource1
ProductListView.DataBind()
**********************
THIS NOT BRING ALL THE RECORDS. ALWAYS LEAVE ONE OUT.I THINK THE FIRST ONE.
Dim conn As SqlConnection
Dim cmd As SqlCommand
Dim cmdString As String = "SELECT products.pid, products.pname, flavors.fl_name, product_flavors.flavor_icon FROM product_flavors LEFT JOIN flavors ON product_flavors.flavorsid = flavors.flavorsid LEFT JOIN products ON product_flavors.pid=products.pid WHERE products.pid = 84"
conn = New SqlConnection(ConfigurationManager.ConnectionStrings("eConnectionString").ToString)
cmd = New SqlCommand(cmdString, conn)
conn.Open()
Dim myReader As SqlDataReader
myReader = cmd.ExecuteReader()
myReader.Read()
GridView1.DataSource = myReader
GridView1.DataBind()
conn.Close()
|
|
|
|
|
orsini wrote: myReader.Read()
I think the above line is the problem
When you Use Read reader move to next record.
Instead of binding the reader try to bind DataTable.
orsini wrote: cmd = New SqlCommand(cmdString, conn)
conn.Open()
Dim myReader As SqlDataReader
myReader = cmd.ExecuteReader()
myReader.Read()
GridView1.DataSource = myReader
<br />
Dim adp as new SqlDataAdpter(cmdString,conn);<br />
Dim dt as new DataTable<br />
adp.Fill(dt);<br />
GridView1.DataSource = dt<br />
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
bah - your answer wasn't there when I started writing mine!
|
|
|
|
|
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Try removing the line
myReader.Read()
before binding it to the GridView
The DatReader is a forward-only cursor and you have moved it one record on by reading from it.
You might want to check that ANY rows are returned first though - use
If myReader.HasRows Then....
|
|
|
|
|
thank you so much, both answer are great, both worked fine, thanks again.
I am trying to get away from those fance interface user and get more into the code behind.
so, when I bind that productlistview. with the reader, i have a funcion that return the selected value.
Public ReadOnly Property prodid() As String
Get
Return ProductListView.SelectedValue
End Get
End Property
which i retrieve it in the next page. how can i tell the productlistview, that the datakeynames = myrreader("pid")
from the code behind.
thanks for your help.
|
|
|
|
|
I need to use asp.net to access and capture video from webcam but i want to make it browser independent and OS independent on client side.
I have seen in many articles calling avicap32.dll and also if I use DirectShow API of .net, will it be OS independent?
Or there any other solutions for the problem??
Shall be grateful if you help.
|
|
|
|
|
My application is in Asp.net 2.0.
In my applicaton,
There is one Repeater contorl.
in Repeater there is a button.
I have to disable that button with javascript.
can any one help me.
how can i find bytton id in javascript.
thanks
|
|
|
|
|
When you want to disable?Or In which event?
You need to pass the button id MyButton.ClientID to the JS Function.
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Thanks for replying me.
I want to disable it on form button click event.
thanks
|
|
|
|
|
In page load add
button1.Attributes.Add("onclick","javascript:DisButton('" & button2.ClientID & "')")
JS Function
function DisButton(cntrl)
{
document.getElementById(cntrl).disabled=true;
return false;
}
on button1 click button2 will disable.
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
thanks for Reply.
but i have to access control id from javascript.
like we access another control value.
also button on which i have to access javascript is outside the repeater.
and i required control id which is in repeater.
can u help me in this regards
thanks
|
|
|
|
|
I'm not sure what you are trying to do.
You have repeater and that contains a button atleast. say button1
You have an another button thats outside the repeater. say button2
So on button2 click you want to disable the button1.
If this is the requirement....
1.You can use the FindControl function of repeater to get controls inside therepeater, and pass the ID of button1 to the JS function.
2.You can store the ID inside a hidden field and get it in the JS.
Hop this Helps you...
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Hi
I have the following code which should count the number of rows in the gridview ands then I want it to assign a number to it, so if there three rows it would assing 1, 2, 3 to each row but its not working it shows error Cannot implicitly convert type 'int' to 'string'
any help would be great!
for (int x = 0; x < GridView1.Rows.Count; x++)
{
GridViewRow row = GridView1.Rows[x];
dropdown = ((DropDownList)row.FindControl("ddorder"));
int count =+ 1;
dropdown.DataValueField = count;
}
|
|
|
|
|
Your Code
for (int x = 0; x < GridView1.Rows.Count; x++)
{
GridViewRow row = GridView1.Rows[x];
dropdown = ((DropDownList)row.FindControl("ddorder"));
int count =+ 1;
dropdown.DataValueField = count;
}
Tip:
Or the control does not exist
or it should be count.ToString();
Int32 count = 0;
DropDownList dropdown = new DropDownList();
foreach (GridViewRow row in GridView1.Rows)
{
try
{
dropdown = ((DropDownList)row.FindControl("ddorder"));
count++;
dropdown.DataValueField = count.ToString();
}
catch (Exception err)
{
}
}
Good Luck
|
|
|
|
|
I tried your code and it showed blank in the dropdownlist:
why would this be?
thhanks"
|
|
|
|
|
You only fill DataValueField but you should also fill DataTextField.
In the OnSelectedIndexChanged- event you can then pick the .SelectedValue, which is the DataValueField.. If you pick in that event the .SelectedIndex.Text you have the DataTextField.
In this case you can show a database description field in the DataTextField while attaching it's databse field ID to the DataValueField.
|
|
|
|
|
OK thanks for that
Now say Ive got 3 rows I want to add 1,2,3 to each dropdown in each row therefore I want the number of rows to appear in the dropdownlist, how would I do that? WOuld it just be an extension to the code I have?
|
|
|
|
|
the extension would be like this.
DropDownList dropdown = new DropDownList();
foreach (GridViewRow row in GridView1.Rows)
{
try
{
dropdown = ((DropDownList)row.FindControl("ddorder"));
for (int count = 1; count <= 3; count++)
{
dropdown.Items.Add(new ListItem(count.ToString(),count.ToString()));
}
}
catch (Exception err)
{
}
}
|
|
|
|