|
i want to create image for the contents in Div Element.
i need to generate image from html
Best Regards,
Chetan Patel
|
|
|
|
|
|
I hope that this might work....
$(document).ready(function(){
var imageSrc= $('div').css('background-image');
alert(imageSrc);
$('img').attr('src',imageSrc);
});
|
|
|
|
|
Actually I need the same result fot collection of images in the same div.. But I cant.. Help me if anyone have idea
<div id="imageCollect">
<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>
</div>
<img src="imageGeneratedFrom-imageCollect"/>
|
|
|
|
|
I have the same issue, I want to create an image from div contents, any help possible ??
|
|
|
|
|
|
Hi,
I'm trying to create an objectdatasource in code and then bind a gridview.
ObjectDataSource objDS = new ObjectDataSource();
objDS.DataObjectTypeName = "VeriWeb_Administration.BusinessObjects.Provider";
objDS.TypeName = "VeriWeb_Administration.BusinessObjects.Providers";
objDS.SelectMethod = "PopulateProviders()";
objDS.UpdateMethod = "Update(Provider item)";
objDS.ID = "ObjectDataSource1";
I get the following error on gridview.databind() :
The Select operation is not supported by ObjectDataSource 'ObjectDataSource1' unless the SelectMethod is specified.
Please help
|
|
|
|
|
try this out
objDS.SelectMethod = PopulateProviders;
Best Regards,
Chetan Patel
|
|
|
|
|
Hi, thanx for the reply but it has to be a string type.
|
|
|
|
|
Hi, thanx for the reply but it has to be a string and PopulateProviders return a list<>
|
|
|
|
|
Did you try it?
What it's looking for is the name of the function that should be executed.
Brad
|
|
|
|
|
I have tried:
objDS.SelectMethod = "PopulateProviders"; //The sytax is correct here.
as well as: objDS.SelectMethod = PopulateProviders(); in this instance I get the following error
Cannot implicitly convert type 'System.Collections.Generic.List <veriweb_administration.businessobjects.provider>' to 'string'
ObjectDataSource objDS = new ObjectDataSource();
objDS.DataObjectTypeName = "VeriWeb_Administration.BusinessObjects.Provider";
objDS.TypeName = "VeriWeb_Administration.BusinessObjects.Providers";
objDS.SelectMethod = "PopulateProviders()";
objDS.UpdateMethod = "Update";
objDS.ID = "ObjectDataSource1";
Is the rest of the above code correct? I have never created an objectdatasource is code before.
Thanx again
|
|
|
|
|
The solution was that I needed to set the gridview.DataSource = objDS. I previously set the gridview.DataSourceID = "ObjectDataSource1" which I thought is the same.
ObjectDataSource objDS = new ObjectDataSource();
objDS.DataObjectTypeName = "Provider";
objDS.TypeName = "Providers";
objDS.SelectMethod = "PopulateProviders";
objDS.UpdateMethod = "Update";
objDS.ID = "ObjectDataSource1";
The solution was that I needed to set the gridview.DataSource = objDS. I previously set the gridview.DataSourceID = "ObjectDataSource1" which I thought is the same. Everything is working nice.
Thanx
|
|
|
|
|
How to add a chekbox,TextBox and another webcontrol in repeter and datalist and how to generate its event.
please suggest me!
thank you
sam
Final year student of MCA
|
|
|
|
|
what do you mean repeater
do you mean a loop?
|
|
|
|
|
Repeter means <asp:repeter id="sam" runat="server">
its a control
Final year student of MCA
|
|
|
|
|
Hello friends........
I am having some problem in my project....
I have to submit the questions in the database but the problem is that if some question are having images then what to do?????
How to save the whole question with the images at its proper location and how to retrieve the question.
Help me plzzzzzzzzz
I want to import bulk of data from the excel sheet....i think if i convert each cell value that is either question or option with or without images to an single image....such as each question and its answer are having unique images...and now save their path in the database and images on the server.........
IS is possible?????
How to retrieve cell value from the excel and convert it into image...
Deepak Nigam
|
|
|
|
|
there are a view ways to save images
you can just save the image location in your database table column then write some front end code to access that table and display the image
or you could store the image in the database, this has problems however because you will need a large database if you plan to store lots of images
hope this helps
|
|
|
|
|
Thanks Dear,
What to do??
When I have to upload a bulk of data???
It'll not be a good way to load each image...and it'll be very time consuming.........
Deepak Nigam
|
|
|
|
|
no can you explain the siutation more?
are users uploading images to your web server?
|
|
|
|
|
No Only Admin will upload papers.
But i want to do this with more flexibility such as just import the excel sheet.......
But i think that i can restrict the admin to set a flag where ever an image come and put the server path of that image between the flags.
So that while retrieveing the text i can find the image path and build a dynamic image on runtime.......
Its my idea is it okay.......
Deepak Nigam
|
|
|
|
|
Hey all,
I'm trying to edit my Web.config in runtime, but I get some weird behaviour. Probably something simple I couldn't find on the net. But I'm new to this, so bear with me.
In my code I open the ~/Web.config file and it reads it from the rood of my project folder. When I try to save it to ~/Web.config, it writes it to C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\~\Web.config instead.
How can the same relative path point to 2 places? Read from here but write to there ?!? How do I solve this?
Here is my sample code:
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="webconfig._Default" %><br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<br />
<html xmlns="http://www.w3.org/1999/xhtml" ><br />
<head runat="server"><br />
<title>Untitled Page</title><br />
</head><br />
<br />
<body><br />
<form id="form1" runat="server"><br />
<div><br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br /><br />
<hr /><br />
<br /><br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br /><br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="save Web.Config" /><br /><br />
<asp:TextBox ID="TextBox3" runat="server" Width="754px"></asp:TextBox></div><br />
</form><br />
</body><br />
</html><br />
Default.aspx.cs
using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Collections;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
<br />
namespace webconfig<br />
{<br />
public partial class _Default : System.Web.UI.Page<br />
{<br />
System.Configuration.Configuration config;<br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~/Web.config");<br />
TextBox1.Text = System.Web.Configuration.WebConfigurationManager.AppSettings["myKey"];<br />
}<br />
<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
System.Web.Configuration.WebConfigurationManager.AppSettings["myKey"] = TextBox2.Text;<br />
config.SaveAs("~/Web.config");<br />
TextBox3.Text = config.FilePath;<br />
}<br />
}<br />
}<br />
Web.config
<?xml version="1.0"?><br />
<br />
<configuration><br />
<br />
<appSettings><br />
<add key="myKey" value="ABCD"/><br />
</appSettings><br />
<connectionStrings/><br />
<br />
<system.web><br />
<compilation debug="true" /><br />
<authentication mode="Windows" /><br />
</system.web><br />
<br />
</configuration><br />
|
|
|
|
|
i dont think its your code i think you just need to make sure you save it to your root folder of your application.
Becausae its a different file to a normal c# file its behaviour is different when you save
Bear in mind i'm not 100% sure on this
|
|
|
|
|
How do I make sure? Code a absolute path or something?
|
|
|
|
|
how does sms gateway work?
|
|
|
|