|
Hi,
I am trying to repeat image in word (containing HTML) for some table cells. But the image is not displayed in MS Word. It displays in IE / other browsers. I am using background-image and repeat x for this.
I searched for the same and found that background images are not supported in MS Word. Is there any workaround for this.
Thanks !
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Hi Guys and Gals,
I am using a javascript function to update a label in a template column of a gridview. This all works fine, but the problem we are having is that when we want to update the database with the changes, the labels returns the old values instead of the updated values in the labels.
Here is our JavaScript. If anyone can tell us what we are doing wrong or how to correct this problem, it will be greatly appreciated.
string script = @"
function calcQty(QtyPerCarton,Cartons, num)
{
if(num < 10)
num = '0' + num;
var i = document.getElementById('dg3_ctl'+num+'_txtCartonsPicked');
var carPicked = i.value;
var out;
if(carPicked <= Cartons)
{
out = parseInt(carPicked * QtyPerCarton)
}
else
{
alert('Cartons Picked cant be greater than Cartons');
return;
}
var lbl = document.getElementById('dg3_ctl'+num+'_lblQtyPicked');
lbl.innerHTML = out;
}
";
this.RegisterStartupScript("Calc", script);
Kind Regards,
Elizma
|
|
|
|
|
Use this:
lbl.value= out
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
It doesnt work! Visual Studio generates tags in the html output, thus it will not contain the value attribute but only the innerHTML attribute which does not change or update the old value with the new value.
Any ohter suggestions?
Kind Regards,
Elizma
|
|
|
|
|
if lbl is not a server side control then how you can access it server side in code behind for save to the Database?
Note: you can once more test with lbl.innerText=out;
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
My Label is a Server side control since it's a Template field of the GridView. The code I am doing is in Javascript that updates the values client-side. Unfortunately the client-side values does not get sent back to the server for saving.
Tried innerText as well. Still not working.
Regards,
Elizma
|
|
|
|
|
What do you want exactly? Do you those values prepared by JS to the updated in DB?
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
I have a gridview. In my gridview I have static data, a textbox column for entering the amount of cartons picked, a label to display the value of the amount of cartons picked / the qty per carton. The javascript takes care of this and display the values in the grid.
So, now I have a save button in order to update this data back into the database with the new QtyPicked. Unfortunately the html (if you go to view source) didn't update the old values with the new values. I need the new values to be sent to the database.
Any idea what else I can try?
Regards,
Elizma
|
|
|
|
|
I hope you are trying to update values in Gridview's edit mode. If so use #Bind("colname") for the textbox. Hopefully this may solve. But as far as I now if you are placing values from js they do not persists. Lets first try with bind. If does not we need to look for some work around for it.
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
Hi,
Instead of giving update button in the each row of grid u can give a button for updation.In the click event of that button u have to check for the value which is changed in text box.Then u can use button.attribute.add("onclick","JS function") to bind with server these values.Hope this will
help u
Regrds
Lijo
|
|
|
|
|
AFAIK, updating the labels on client side does not go back to server. You can keep a hidden field for the same thing and update both the label and the hidden field. On the server get the updated value from the hidden field and save it to the DB.
-----
|
|
|
|
|
I Would suggest to use AJAX.
|
|
|
|
|
Hello,
I have a question and I hope you can help me.
I'm working on MOSS (Office Sharepoint Server) 2007 portal and made it multi lingual using the Labels. I have two languages Arabic and English. To make the user able to switch between the two languages I used the control "Variation Label Menu".
Now my question is: How can I change or customize the look of this control? i.e: Change it from the drop down menu style to just one language selection.
Take a look at this portal and see what I mean about the language selection: http://jo.zain.com OR http://www.alphamosaik.com
Really looking forward for your reply to tell me how I can achieve this.
Thanks in advance.
|
|
|
|
|
I m creating a table with so many different controls in it but this table is to be created at run time it was been done by me but i was unable to maintain the value of the controls which one is to be inserted by the user and the page was post back. so pls give me the solution for that. I want the proper way to maintain the value of the controls like textbox and combo and checkbox because i also store it into the database and also retrive it to the form back. I m putting my code on the page load event but the page postback property is false because i need like this and pls keep in mind one thing that the table is created by the code only and i have to trace the control and while the page is postback at that time the table value lost so i required this from u.
Hiren Dave
|
|
|
|
|
If i am nor wrong you have created a custom control and you have rendered the whole html content.
Now you have question how to persist the values of those controls.
simple while rendering all controls give a unique name to them like
Even this control will work if don't pu runat server.
Now check the value in request object of Pageload
string TextBoxValue = Request["TextBoxName"];
Assumed you will check for null or empty first
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
thanks for ur reply but my dear friend i was not created any custom control but i was generating the report through the table and it has so many control in it and i want to store the value of that control while the page was post back. so please send me any suggestion for that if u know for that.
Hiren Dave
|
|
|
|
|
hiren dave wrote: but i was unable to maintain the value of the controls
This is the problem of viewstate. Dynamic controls created on page_load won't maintain any viewstate. So create your table and dynamic control on init event. This will keep the viewstate and you will get value on postback.
|
|
|
|
|
thanks for ur reply but when i was trying this at that time i found an error in the code that multiple controls found with the same id while i was never assigned any id to any control so pls give some solution for that
Hiren Dave
|
|
|
|
|
Each control need unique id. So check which one is getting duplicate id. If you are not assigning any id, do assign a unique id for the controls.
|
|
|
|
|
Hi all,
Can u give me one example (With code) which shows how to bind menu control from database(Dynamically).
Thanks in advance
Lijo
|
|
|
|
|
Can u be more specific?
Koushik
|
|
|
|
|
Hi,
Thanks for your response.I need to bind the Menu Control(in asp.net 2.0)
from database.(Dynamically).I request you to give me the sample code for that.Hope u understood my query.
Lijo
|
|
|
|
|
|
I have a table in MasterPage like this;
<table border="0" cellpadding="0" cellspacing="0" style="width: 800px; height: 100%">
<tr>
<td colspan="2" style="height: 126px; width: 800px;">
TITLE
</td>
</tr>
<tr>
<td style="width: 172px; height: 26px;">
ROW1
</td>
<td rowspan="3" style="height : 100%; width : 632px;">
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder>
</td>
</tr>
<tr>
<td style="width: 172px; height: 26px;">
ROW2
</td>
</tr>
<tr>
<td style="width: 172px; height: auto;">
ROW3
</td>
</tr>
</table>
Table Preview
TITLE
---------------------------
ROW1 | ContentPlaceHolder1
ROW2 |
ROW3 |
ROW1 and ROW2 height is 26px, and ROW3 height is auto. So I want; for example if ContentPlaceHolder1 heigh is 100px so ROW3 height automatically 48px. Another example if ContentPlaceHolder1 heigh is 200px so ROW3 height automatically 148px.
But this is not work, all row equally expand. I want to ROW1 and ROW2 must be 26px. How can I do?
Best Regards...
-- modified at 5:04 Tuesday 23rd October, 2007
|
|
|
|
|
height for table cells/rows can be achieved by placing a transparent gif image inside the td and set the height of the image instead of the td itself. So create a transparent gif of 1px height and 1px width and use that image in row2 and row3 and set their height as required.
-----
|
|
|
|