|
Print Screen.
That really is an awful question.
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
Thanks .netman.
My requirement is to convert only Gridview into Image. Not the Entire page or Screen, these are i already did it.
If you know any other way to do that, let me know.
|
|
|
|
|
sekhar.k wrote: Is there any other way to achieve this.
No, there is not any built-in method for doing this. Certainly expeecting the HTML to render as an image is not going to work as stated.
About the only way I can think of doing this is to create a blank Bitmap, and draw a table using the GDI+ drawing methods. You could read the columns/rows from your gridview and replicate this on the bitmap.
|
|
|
|
|
Hi,
i have problem in ie6 with the onfocus event.The onblur and onfocus event execute some javascript code. The problem is , in mozzilla this work ok, in ie6 work only for some objects.
Fe: for the companyname textbox the browser didnt apply this 2 events, the select object work fine.
Can u help me in this problem?
I add this event to my object fr5om code behind:
in page load :
..
Me.companyname.Attributes.Add("onFocus", "changehint('hint1',2)")
Me.companyname.Attributes.Add("onBlur", "check_field('companyname',this.value,'hint1')")
Me.state.Attributes.Add("onfocus", "changehint('hint4',2)")
Me.state.Attributes.Add("onblur", "check_field('state',this.value,'hint4')")
My aspx page looks like this
...
<table style="text-align:left;">
<tbody>
<tr class="row">
<td ><asp:Label ID="txtcompanyname" runat="server" Text="name + form"></asp:Label>*
<br /><asp:Label ID="obs_name" runat="server" Font-Size="9px"></asp:Label></td>
<td><asp:TextBox ID="companyname" runat="server" ></asp:TextBox>
</td>
<td>
<span id="hint1" class="hintForRegistration ">
<asp:RequiredFieldValidator CssClass="hinttext" ID="reqname" Display="Dynamic" runat="server" ControlToValidate="companyname" ErrorMessage="error1"></asp:RequiredFieldValidator>
<asp:label ID="Label0" runat="server" CssClass="hinttext"></asp:label></span>
</td>
</tr>
<tr class="row">
<td><asp:Label ID="txtcompanycounty" runat="server" Text="county"></asp:Label>*</td>
<td>
<select id="state" runat="server" >
<option selected="selected" value=""></option>
<option value="Baranya">Baranya</option>
</select></td>
<td>
<span id="hint4" class="hintForRegistration ">
<asp:label CssClass="hinttext" ID="Label3" runat="server"></asp:label>
</span>
</td>
</tr>
The javascript code change hintbox style on onfocus or onblur event:
function changehint(elem,type,label)
{
var hint = document.getElementById(elem);
hint.style.visibility = "visible";
if (type == 1)
{hint.className='hintForRegistration red';}
else if (type == 2)
{hint.className='hintForRegistration orange';}
else if (type == 3)
{hint.className='hintForRegistration blue';
hint.innertext = 'OKSA!';}
}
function check_field(thefield,thevalue,thehint)
{
if (thefield == "companyname" || thefield == "state" || thefield =="companystreet" || thefield =="companycity")
{if (validate_anytext(thevalue)) changehint(thehint,3)
else changehint(thehint,1)
}
else if (thefield == "companymail")
{if (validate_email(thevalue)) changehint(thehint,3)
else changehint(thehint,1)
}
else if (thefield == "companypass1" || thefield == "companypass2")
{if (validate_pass(thevalue)) changehint(thehint,3)
else changehint(thehint,1)
}
else changehint(thehint,3)
}
thanks
|
|
|
|
|
If this is a direct copy of your code, your solution may be really simple: check casing when assigning the attributes to Me.CompanyName. You have "onFocus" in that control, but "onfocus" in the State control.
Have faith in yourself; amateurs built the Ark, professionals built the Titanic.
|
|
|
|
|
i try it but not work.
The freaky thing is, when i make a save page as and i start the local copy in ie6, everything works fine. I must mention the page was saved in Ie6, so the generated code is the same.
In developer toolbar the textbox doesnt have the onfocus and onblur event.
thanks
|
|
|
|
|
hi..i want to validate drop down list in asp content page..
|
|
|
|
|
Good for you. Is there a specific problem? Have you perhaps looked at the section of the toolbox that contains the validator controls...?
|
|
|
|
|
What a required field validator?
Be more specifc?
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
meghamaharshi wrote: hi..i want to validate drop down list in asp content page..
good, now did you have a question?
|
|
|
|
|
I'm trying to make a data bound column invisible after data binding, because it won't exist before data binding. However, the DataGrid.Columns collection indicates a count of 0, making it seem as if the automatically generated columns don't belong to the collection.
How can I make a column that is automatically generated during binding invisible?
|
|
|
|
|
on the basis of your condition
if(Condition)
gv.columns[no].visible=true;
else
gv.columns[no].visible=false;
|
|
|
|
|
As I stated in my question, the columns collection is empty.
|
|
|
|
|
Have you tried doing in the event handler for DataBound? I presume that the auto-generated columns are created when the control data binds.
|
|
|
|
|
I'm currently doing it in the ItemCreate event, with success, thanks.
It was even after the DataBind call that the Columns collection was empty. I wonder if the call is asynchronous?
|
|
|
|
|
i m using sql server2000 and ASP.net2005. i create report using reportviewer. and set its processing mode to [server].print option is visible in design time but not show in run time. please help me its very very urgent. my client is wait for it. he have to print the report immediate bases. if i export report in excel or pdf its format will disturb. but i want to print directly from reportviewer. please help it very very urgent.
Amit Gautam
|
|
|
|
|
How it can be possiable please help me
Anu Gaur
|
|
|
|
|
Google, double-poster.
Blog link to be reinstated at a later date.
|
|
|
|
|
Hi All,
I would like to take only Date part of DateTime variable?
Eg. 2008-09-18 12:00:01.000' i only needed 2008-09-18
Please advice
Thank you
Kibrom
|
|
|
|
|
DatTime has a ToShortDateString() method. You can also access the Year ,Month & Day properties directly.
All this you could have found out yourself by reading the actual documentation for the class.
|
|
|
|
|
Use the Date property of the DateTime structure.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
How we can import MS access database table's data into Sql server 2005 in ASP.net with C# (in Web application) .
Please send me response on my mail id anu.gaur.iec@gmail.com
Anu Gaur
|
|
|
|
|
Putting your email address in your post is not a good idea.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I am having a gridview. I want ot put the data from the gridview to the business object and store it in aarraylist. and then pass the array of objects to store data in the database.
I am not getting the value of the gridview column in the object . I am doing like this
for( i=0;i<gridview1.rows.count;i++)
{
classABC objectABC=new classABC ();
objectABC.ItemBaseId=Convert.ToString(GridView1.Rows[i].Cells[2].Text);
objectABC.Catalog = Convert.ToString(GridView1.Rows[i].Cells[3].Text);
objectABC.Series = Convert.ToString(GridView1.Rows[i].Cells[4].Text);
arr.Add(objbom);
}
Please tell me how to do this?
|
|
|
|
|
try the change shown
for( i=0;i<gridview1.rows.count;i++)>
{
classABC objectABC=new classABC ();
objectABC.ItemBaseId=Convert.ToString(GridView1.Rows[i].Cells[2].Text);
objectABC.Catalog = Convert.ToString(GridView1.Rows[i].Cells[3].Text);
objectABC.Series = Convert.ToString(GridView1.Rows[i].Cells[4].Text);
arr.Add(objectABC);
}
Bob
Ashfield Consultants Ltd
|
|
|
|