|
hi all
i have some code this code will read image on database and Export to file Word
string strLinkMap = "http://" + strHost + strParth + "/Print/" + "ReadImageInDatabase.aspx?typepage=" + strTypePage;
StringBuilder strb = new StringBuilder();
strb.Append("\t\t\t\n");
strb.Append("\t\t\t\t\n");
strb.Append("\t\t\t\t\t\n");
strb.Append("\t\t\t\t\n");
strb.Append("\t\t\t\n");
strb.Append("");
strb.Append("\t\t\t\t\t | \n");
ExportWord(strb.ToString());
And I have Function Export()
private void ExportWord(string strhtmldemo)
{
string html = strhtmldemo;
Response.Cache.SetExpires(DateTime.Now.AddSeconds(1));
Response.Clear();
Response.AppendHeader("content-disposition","attachment;filename=FileName.doc");
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.ms-word";
this.EnableViewState = false;
Response.Write("\r\n");
Response.Write(html);
Response.End();
}
but it have Exception
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.
When i dont Export this image show is normal
Some body help me ???
|
|
|
|
|
Hello All,
I a haveing doubt on ...
I am having one form it contains four fields
like user no, name, desg, dob so when i insert these
fields i dont want update in database it update in dataset
when i reterive data from dataset the dataset data it will
shown in gridview .
How i have to apporach please suggest me how to do the
functionality Insert/Update/Delete on dataset to reduce the load on database.
So kindly explain me step step process give me sample progarm its more helpful to me..
Many Thanks
Vijay
|
|
|
|
|
i think you want to store that data only in Dataset not in database. You can put that it quite simple .. How much data is present in the dataset ? (how many users data present in dataset a perticular instant ) if it is only one then you can change the data at any time ... Whats the problem are you facing ?
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... "
|
|
|
|
|
Hello Sandeep,
I dont know how to approach this concept
can u give good example on this.
Many Thanks
vijay
|
|
|
|
|
May be some what like this u can try:
Here I have dataset ds which has some records and I need delete some of them form the output of the Query and use the updated dataset ds.
DataRow objDR;
foreach (DataRow dr in ds.Tables[0].Rows)
{
DataSet ds1 = new DataSet();
cmd1.CommandText = ""; //My Query
SqlDataAdapter adpt2 = new SqlDataAdapter(cmd1);
adpt2.Fill(ds1);
if (ds1.Tables[0].Rows.Count <= 0)
{
dr.Delete();
}
else
{
objDR = objDT.NewRow();
}
ds1.Clear();
}
adpt.Update(ds);
ds.AcceptChanges();
Hope this helps u??
|
|
|
|
|
Hello,
my requirement is if we have filled the form the data display in gridview
in this gridview we can edit the fields and delete the fields but it will not
update in database we have to give one save option if we click that all updated data will save in database.
so kindly guide using dataset how i can do this.
Many Thanks
Vijay
|
|
|
|
|
Hi everyone,
My company has a website, use ms sql server. One table has more than 1000000 records.
When users search data from this table(such as search records which contain the word "school" in NewsTile field.
And the server often occurred deadlock error.
How can I improve it?
Thanks.
P.S. The table has these fields:
NewsID
NewsTitle
NewsContent
NewsClickTimes
NewsInsertTime
=========================================
Make friends with you all.
My Blog, welcome
天气常如二三月,花技不断四时春。
|
|
|
|
|
Hello,
I have a website where customers can register for classroom training. After answering all the questions, I'd like asp.net to send a calendar notice to the users inbox. From what I've seen, I have to attach an ics file that represents an iCalendar. I'm successfully sending emails to the customers...I just have to find out how to add the ics attachment and set the parameters (e.g. remind the customer 24 hrs prior to training day, day of training, etc...).
My users are using Outlook 2003 and greater. I'm using asp.net 2.0. Any ideas?
|
|
|
|
|
Hi all,
I have a GridView (grv) that contain a HyperLinkField ( "MyLink" ).
I have a DataTable (dt) that contain data for GridView. ( I don't use SqlDataSource )
When i click "MyLink", "MyLink"'s NavigateUrl will be Default.aspx?id=param1&idU=param2.
How could i do that?
|
|
|
|
|
You can do it easily in Mygridview_OnRowDataBound event. While binding the grid this event fire on row level then just get the id & idU from other cell and build url string then set it to the Your Link NavigateURL.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
I am using a GridView to display a list of images. I am trying to have it where I click on an icon within the datagrid to change the url of a another image. Basically I want the selector effect on the image and to get the image url from the icon. Below is the code for the GridView, any help would be great. Thanks.
asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1"
AllowPaging="True" GridLines="None" PageSize="4" ShowHeader="False"
AutoGenerateColumns="False" OnLoad="GridView1_Load" SelectedIndex="0">
Columns>
asp:TemplateField>
ItemTemplate>
asp:ImageButton ID="iconBtn" ImageUrl='<%# Eval("File_Name", "~/images/icon/{0}") %>' runat="server"/>
/ItemTemplate>
/asp:TemplateField>
/Columns>
PagerSettings Mode="NextPrevious"
NextPageImageUrl="~/images/nav_next.jpg" PageButtonCount="4"
PreviousPageImageUrl="~/images/nav_back.jpg" />
/asp:GridView>
-- modified at 13:33 Monday 10th September, 2007
|
|
|
|
|
I need to print a flat file or send printer controls to a specified printer
or port (lpt1,lpt2, com1...) in a web page.
Is it possible? How?
I think i need to embed a control but i don´t know how.
I already read this article http://support.microsoft.com/?kbid=322091 but
this is for windows forms and i am working with web forms!
JL
|
|
|
|
|
I have grid view and I want to add Drop Down list to it on the first row of the grid. That drop down list will contain product names when I will select product name it will show initial value of that product in the grid and some other information.
I have 2 tables
1. Products
ProdID
ProdName
ProdInvoicePrice(same as Initial Price)
Trade Price
Ctns
PerCtnPrice
Date
2.ProductType
ProdID
ProdName
InitalPrice
Date
Now dropdownlist will contain ProductType table and will contain only ProductName so when i select one productname and enter the details I want another dropdown list should be populated in another row.
How can this be done? Please Help
|
|
|
|
|
|
Hi,
I am trying to develop an error handling in our asp.net web app. I'm pretty new to Master pages although the concept of master pages had been completed by someone else & works fine.
What I am trying to achieve is to have some code in the master page (I think this is where it will go) & this will need to handle any errors which occur in the content pages, I'm not quite sure what to do yet if there is an error in the BL or DAL? But, in the app_code folder I have a class (EventLogging.cs) which writes the required error, warning or information to the Event Viewer depending on the information passed to it.
So what I need help with is, how to implement the actual call to the EventLogging.cs - Can I do it in the master page or do I have to do it every time in each content page. If I can do it in the master page (which sound good to me) how can I check to see if an error has occurred. I've spent all afternoon googling & just getting deeper & deeper.
Any help would be appreciated.;)
Thanks
Lady Programmers are a rare breed!
|
|
|
|
|
Female_Programmer wrote: Lady Programmers are a rare breed!
Sorry, I've got this vision in my head of David Walliams in a frock and a pitite parasol sitting in front of visual studio saying "But I'm a lady".
|
|
|
|
|
LOL - I got that, too.
This is where I keep my ladies things.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
lol - I never thought of that!
There are so many blokes on this discussion, suppose I wanted to stand out;)
My best buddy for progamming help who was a bloke has moved companies now, so I have no one else to ask!
Ahh...
Lady Programmers are a rare breed!
|
|
|
|
|
I'd be more inclined to write a base class which contains this functionality and make all my pages derive from that, so they are just there, not in the master page ( which you can't just call, AFAIK )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello,
I'm extremely new to ASP and a good portion of Visual Studio in general, I've only got experience writing form apps.
I need to write an internal webapp which a user can access to enter in data to begin a job in processing data via an sql server and images. Currently we have a similar service running on Java, but wasn't developed properly and causes the SQL server to eat up TONS of ram which requires constant restarting of the service. So I need(would like) to code a new one from scratch in C#.
Which project should I use, WebService or WebApplication project? What are the differences between the two?
With apologies for my newbieness,
Veralix
|
|
|
|
|
Lord_Veralix wrote: Which project should I use, WebService or WebApplication project?
WebApplication.
Lord_Veralix wrote: What are the differences between the two?
A WebService is a library of methods that you call from another application. A WebApplication is a normal web site.
Lord_Veralix wrote: causes the SQL server to eat up TONS of ram
This is quite normal for MS SQL Server. By default it will use up every last bit of unused memory to maximise database performance. If you are using the server for anything more than a database server, you should change the settings in the database to limit the amount of memory that it will use.
---
single minded; short sighted; long gone;
|
|
|
|
|
Lord_Veralix wrote: I'm extremely new to ASP
FWIW, ASP and ASP.NET are two different things. ASP.NET is what you appear to be using, which is the right choice.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
To use a third party web service in the site I need to use a special code to communicate with that web service . I dont want the user to be able to see this code in the source code of HTML. I also want to save the code as a javascript variable to communicate with the webservice using ajax. The special code needs to be stored on the browser of the user. How can I do this .
|
|
|
|
|
The only way you could do this, is if you define the variable, make an AJAX call, and return the value to set the variable. Then it won't be visible in the source, although anyone who wants to, can get it using Firebug or similar. There's simply no way to keep anything secret, if it's going to be client side.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for your reply.
Do you have any idea on how to deal with this ? How should I store the code no matter on the server or client.
One solution would be to encrypt the code , and decrypt it on the server . What class do u recommend for this ?( a class that make finding the code very hard )
|
|
|
|