|
Hi All,
I am converting HTML to PDF using itextsharp.dll. My HTML conatins table and
many rows. When a row goes to next page, its cells data is not shown in pdf
document. Initially, I fixed it by changing top and bottom margins. But it
caused problem in other cases. Note that I am getting HTML from user
control. When I copy this HTML in htm file, It shows all the data correctly.
But in pdf it does not show.
Any help?
Thanks,
Pervaiz Niazi
|
|
|
|
|
hi, iam using asp.net with c#
when iam trying to execute this querry iam getting error
can you correct my querry
SqlCommand cmdallltransactions = new SqlCommand("SELECT SUM(Amount)FROM AllTransactions WHERE (TransCode <> 0) GROUP by BranchKey="+Convert.ToInt32(Session["BranchKey"])+"", con);
con.Open();
txttotal.Text = Convert.ToString(Convert.ToInt32(cmdallltransactions.ExecuteScalar()));
con.Close();
error iam getting is
Incorrect syntax near '='.
|
|
|
|
|
SELECT SUM(Amount)
FROM AllTransactions
WHERE (TransCode <> 0)
AND BranchKey = 'branchkey'
You should also look at parameterizing your query.
|
|
|
|
|
i have created drop downdownlist and i m binding it with the testnames in the database.
Private Function load_sptestreqtestnameddl()
Dim Adptr As New SqlDataAdapter
Dim Pkgddldt As New DataSet
'################## FOR CONNECTION ################
Dim MySearchCon As DbConnection = providerFactory.CreateConnection()
MySearchCon.ConnectionString = connectionString.ConnectionString
'################### END OF CONNECTION #################
Dim str As String = Nothing
str = ("SELECT test_id, test_name FROM TestName")
Adptr = New SqlDataAdapter(str, MySearchCon)
Adptr.Fill(Pkgddldt)
sptestreqtestnameddl.DataSource = Pkgddldt
sptestreqtestnameddl.DataSource = Pkgddldt.Tables(0)
sptestreqtestnameddl.DataTextField = Pkgddldt.Tables(0).Columns("test_name").ColumnName.ToString
sptestreqtestnameddl.DataValueField = Pkgddldt.Tables(0).Columns("test_id").ColumnName.ToString
sptestreqtestnameddl.DataBind()
Return 0
End sub
the code shows me following error....this exactly same code works perfect in other webforms.
'sptestreqtestnameddl' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value
|
|
|
|
|
hi,
After filling the data adapter, please clear the dropdown then try to bind.
sptestreqtestnameddl.Items.Clear();
Seems to me after binding list, dropdown tries to select a value that is not even in the dropdown list.
Thnaks
|
|
|
|
|
Just specify columns in DataTextField and DataValueField like this:
sptestreqtestnameddl.DataTextField = "test_name"
sptestreqtestnameddl.DataValueField = "test_id"
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
Hi, I'm writing a control of the dynamic in a
existing page is added.
You gotta think of a content management system, to a already
existing page will be added a User Control.
In this Usercontrol is used an UpdatePanel and ModalPopup.
To use these elements I need a script manager
I can not add an the Script Manager to my UserControl even one already existing Page in the CMS in my control will be added??
Are there any opportunities?
I hope you understand what I mean ....
Regards
|
|
|
|
|
If I understood you correctly, you're asking if only one ScriptManager per Page is allowed.
Yes, there can be only One.
I usually solve the problem by using a masterpage with a scriptmanager.
Don't insert the sriptmanager in your control, only the updatepanel(s).
Further reading : http://msdn.microsoft.com/en-us/library/bb398864.aspx[^]
Cheers
I don't like my signature at all
|
|
|
|
|
But how shoul i use a Master page if i write a Usercontrol who can be added in a Page?
I understand you wrong or just what?
So according to your proposal, it would mean that I have in my control in a MasterPage and who is my Script Manager?
Where shall I find my ModalPopup and update panels?
|
|
|
|
|
You don't need to change your usercontrol, just don't put a scriptmanager in it.
If you create a masterpage in your site which has a scriptmanager on it, you can drop or create your usercontrol on any page the has that masterpage.
It's a design issue :
- if a usercontrol has a scriptmanager on it, you can only put it in a page once.
- if you put the scriptmanager on a (content)page, there can be no usercontrols that have a scriptmanager.
- if you want to put your usercontrol on more than one page, you have to put a scriptmanager on every page that uses it.
Does the term "Webpart" mean anything to you? What you are trying to do sounds a bit similar to me.
Cheers
I don't like my signature at all
|
|
|
|
|
I have heard of but have not used it yet why?
I can not use MasterPage because the design is already given!
Its look like this in our cms
So Imagine somebody can add my Control right now into the Page(Template)! So This Page is already present with a Scriptmanager.
Klick ME
|
|
|
|
|
Ok, then go for the page, just DON'T put a scriptmanager in your own usercontrol.
It is an option to check in your code if a scriptmanager exists, if it doesn't then create it, before your ajax controls (ie UpdatePanel(s)) are loaded.
Cheers
I don't like my signature at all
|
|
|
|
|
Hmm will check it! But Hmm what shall i do if its already exsist?
What are developing so far?
|
|
|
|
|
This is what I once did :
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
private ScriptManager_AjaxManager = ScriptManager.GetCurrent(this.Page);
if (_AjaxManager == null)
{
_AjaxManager = new ScriptManager();
_AjaxManager.EnablePartialRendering = true;
_AjaxManager.EnableScriptLocalization = true;
if (this.Page.Form != null)
{
this.Page.Form.Controls.AddAt(0, _AjaxManager);
}
}
}
Mind you, if the scripmanager already exists, set the properties right!
Cheers
I don't like my signature at all
|
|
|
|
|
ok that's obvious , what is to do, which properties must be set right?
Its possible to write a oder Control who contains only a scriptmanager? This Control could i add into my other Contro the contains updatepanels etc...l.
Will be possible or?
|
|
|
|
|
There can only be one scriptmanager.
I don't know if we are conversing on the same subject.
- Declare the ScriptManager at Page level (because you can't put it in a MasterPage).
- Either put your usercontrol inside an UpdatePanel or contain your controls within an UpdatePanel in your usercontrol.
My example only suggested a way to dynamically put a ScriptManager on the Page. Which properties should be set is completely up to you.
Cheers
I don't like my signature at all
|
|
|
|
|
ScriptManager
A server control that makes script resources available to the browser, including the Microsoft AJAX Library and the functionality that enables partial-page rendering.
A server control that enables nested components to add script and service references if the page already contains a ScriptManager control.
It is possible to add a ScriptManagerProxy to my UserControl?
|
|
|
|
|
Hi
how to execute server side code in asp.net while using jquery.
like some login form is opened by using jquery as model popup and how will be executed submit button click event.
or any other way while using jquery to perform login form functionality.
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
trilokharry wrote: execute server side code in asp.net while using jquery
The most common method I use for this purpose is WebMethod.
1. Create a webmethod in your code behind.
[System.Web.Services.WebMethod(EnableSession = true)]
public static string DemoMethodInCodeBehind(string msg)
{
return "OK_" + msg;
}
2. Write a javascript function to call this web method.
function demo()
{
PageMethods.DemoMethodInCodeBehind('hello',OnGetMessageSuccess, OnGetMessageFailure);
}
3. Implement success & failure methods in java script.
function OnGetMessageSuccess(result, userContext, methodName)
{
alert("Success " + result);
}
function OnGetMessageFailure(error, userContext, methodName)
{
alert("Failed");
}
4. Now call Demo on button click.
|
|
|
|
|
not getting exactly what to do with this code.
I tried but no output.
I'm new in jquery so please help me.
You get the best out of others when you give the best of yourself.
|
|
|
|
|
|
trilokharry wrote: like some login form is opened by using jquery as model popup and how will be executed submit button click event.
The jQuery model popup displays the content of the DIV itself. I you use asp buttons inside your div to complete the login process you should have no problem accessing their _OnClick method in code behind.
|
|
|
|
|
button click event not getting executed.
thanks for your kind reply.
You get the best out of others when you give the best of yourself.
|
|
|
|
|
In that case you can go for page methods.
|
|
|
|
|
Hi
I'm new to crystal reports.I am developing a web application which generates reports . I'm using Crystal Reports XI developer edition to generate reports. How do I deploy the web application in the server along with the Crystal reports. How to take care of licensing of crystal reports in the deployment. Is there any restrictions such as number of users accessing the report at a given time
This web application is a Internet application(not an intranet application). Any help is appreciated.
Thanks in advance,
Harshini.
modified on Friday, June 11, 2010 9:06 PM
|
|
|
|