|
|
Hi ASP.Net experts...Plz visit the Silverlight message board and answer the first question titled "Silverlight WCF Issue"...plz plz plz
<font style="color:Green;font-family:Courier New;font-weight:bold;">C</font><font style="color:Blue;font-family:Courier New;font-weight:bold;">C</font><font style="color:Pink;font-family:Courier New;font-weight:bold;">26</font>
|
|
|
|
|
Hi,
I am deploying a ASP.Net webservice(the webservice acts in pull mode) in c#. In the webservice i am providing a database connection to the postgressql server and i am also using prepared statements.
I also tried to used singleton pattern, to make efficient use of the prepared statements(i.e to prepare the statements only once through out the webservice). Now the problem i am getting is, all the prepared statements(sql commands) are becoming null and returning an exception "the connection is not open" upon each invocation of the webservice by the client.
So, is there any methodology to make efficient use of the prepared statements in the webservice.
|
|
|
|
|
Hello, this is Vikash Gohil.
I have a developed a Web Application whereby i need to print a report from my application.
The printer is installed on Client PC and is shared on the network.
I have installed the printer on the Web Server.
The Code I use is:
report.PrintOptions.PrinterName = "\\PCName\PrinterName"
report.PrintToPrinter(1,false,1,1).
Now the problem I am facing when given print from Web Server is as below:
When I give command for Printing a Test Page, it prints properly.
When I give Print command from a Word, PDF etc documents, it still prints properly.
But When I give Print Command using above code from My Web Application (ie from Browser Window), it displays a error Message on the PC on which Printer is Attached.
Spoolsv.exe Application Error
Message : "The Instruction at "0x500a0330" referenced memory at "0x00000000". This memory could not be read.
Anyone has any idea why I am getting this message when printing from my Application and not while printing normally.
Do I have to Set any other permissions for the Printer on the Server, eg. permissions for IIS to Print from that printer or permissions for ASPNET user for the printer.
Please Anyone could suggest me some thing in this regards.
Any help would be greatly appreciated.
Awaiting a reply soon.
Thanks in Advance.
|
|
|
|
|
|
Hello, Abhijit.
Thanks for the reply.
I have gone through the article as suggested by you.
I have a query.
The article says of mapping the network printer on the Server and to do this we have to make changes in registry.
I want to know how mapping of printer is done and what changes do I have to make in registry so that the Web Server has full rights for network printer.
Can you please provide me guidance in this issue.
Awaiting your reply.
Thanks Again.
|
|
|
|
|
Hi, all,
I have a grid data table that will list all the modules(at most 14, if use it, put 'X' in the column) each project used, the project name and used modules in one row.
My problem is that since the module name that is put at header is long, so I want to make module name vertical in header as the following in RowDataBound() method:
if (e.Row.RowType == DataControlRowType.Header) {
////loop all columns
e.Row.Cells[j + 2].Attributes.Add("style", "FILTER: flipv fliph;WRITING-MODE: tb-rl;");
}
But after flip the text, it looks very ugly, if I original have red color as background color for header, after vertical text, each column has two color: red, white; the text column doesn't fit the gridview column.
I try to set gridview column width, and set the same width in the above style setting, still doesn't work, can anybody help me??
Thank you very much.
|
|
|
|
|
What exactly is your question? You talk about the colors and it being ugly. Are the colors pertinent to the question? You mention module names being in the row, but then you say they are in the header. Which is it?
|
|
|
|
|
Your question is not clear. Can you please rephrase your question.
Cheers !
Abhijit Jana | MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
i Think as far as my understanding it the problem with the browser related issues..!So you have fix the width..!
This is Only my understanding of your question..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Hello,
I have an aspx page (Test.aspx) and a class (Constants.cs).
The aspx page has a single Asp.net HiddenField.
The Constants.cs class has a list of some public constants defined.
I am not able to bind the value of the hiddenfield with a constant (defined in Constants.cs) during the design time. I need to explicitly call hiddenField.DataBind() method in my Page_Load() method at the run time.
The code that I am using to bind the "Value" property of the HiddenField is:
<asp:hiddenfield id="hdnPosition" runat="server" value="<%# Constant.Position%>">
The Value property of the hiddenField is set only when I call the hdnPosition.DataBind() method in my C# code.
Is there any other alternative to this?? I would not like to call the DataBind() method every now and then since my page has almost 8 - 10 hidden fields which are being bound to such constant values which are defined in Constants.cs
Awaiting for your valuable inputs.
Thanking you all in Advance
Regards
Pratik Shah
|
|
|
|
|
p4pratiks4shah wrote: set only when I call the hdnPosition.DataBind()
And what is the problem? The name of your control is hdnPosition not hiddenField. If you need to DataBind to multiple fields then call the Page.DataBind();
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hi,
You can make the constant static, like
public static int position=10; // just as an example
And then use like
<asp:HiddenField ID="hdnPosition" runat="server" Value='<%= Constant.Position%>'/>
This should solve your problem.
Please mark this answer as good answer if you find this answer useful.
Thanks
|
|
|
|
|
Hello Shahriar,
Thank you very much for your immediate repsonse.
Unfortunately, using <%= Constant.Position%>' is not working. When viewed the HTML generated code in the browser it created something like <%=Constant.Position%>
Thanking you all in Advance
Regards
Pratik Shah
|
|
|
|
|
i have a popup window with ok button. on parent window i have getValue button. when i click on get value button popup window is shown. on ok button click of popup window i want the values of the text box to be asigned to the textbox in parent window. popup window is a user control. and i use this user control with many pages. please help
|
|
|
|
|
Are you using javascript modal dialog?
|
|
|
|
|
im using modal popup of the ajax controls......
|
|
|
|
|
There are several ways to do this,You can access the control of parent window from popup.So you can assign the value to parent window.
For making it generic,Have some property in your popup usercontrol assign the id control on parent window to it and access it as you want.
|
|
|
|
|
in windows what we do if we display a popup window with showdialog() method, after returning control to parent window code starts execution from there so it becomes easy to asign the value of popup window controls to parent window controls. how to do it here in web
|
|
|
|
|
On click of OK button of your popup window you can pass the value in parent control from popup itself
|
|
|
|
|
on parent page
<script type="text/javascript">
function OpenPopup() {
window.open("popup.aspx","List","scrollbars=no,resizable=no,width=400,height=280");
return false;
}
</script>
on your user control
<script language="javascript">
function GetTextboxValue(val)
{
window.opener.document.getElementById("ctl00_ContentPlaceHolder1_TextBox2").value = val;
window.close();
}
</script>
|
|
|
|
|
Your user control should expose an event. Each page that uses the user control should listen for that event and in the handler for it set whatever values you need set.
|
|
|
|
|
Hi guys, tryn use the MS Sql LIMIT claus but not returning any values at all.
I tried both this but none return any values:
1. string query = @"SELECT * FROM [contact] LIMIT 0, 10 WHERE [user_id] = '" + userid + "'";
2. string query = @"SELECT * FROM [contact] WHERE [user_id] = '" + userid + "' LIMIT 0, 10";
I tried to use the OFFSET, but no luck either....
So far i have 30 sample contacts and would like to retrieve them 10 each
and none of the two statements are returning any record...
Anyone see my mistake here? please help...
Thanks,
Morg
|
|
|
|
|
As far as i know there is nothing like LIMIT in MS Sql Server.
You need to use other techniques.
|
|
|
|
|