|
Yes the user want smart output
|
|
|
|
|
It is the Response.Write which does not work inside a button
Response.Clear();
Response.AddHeader("content-disposition", "attachment; filename=MyFile.xls");
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.ms-excel";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite =new HtmlTextWriter(stringWrite);
GRIDVIEW_LIST.RenderControl(htmlWrite);
Response.Output.Write(stringWrite.ToString());
Response.Flush();
Response.End();
|
|
|
|
|
Do you think this is smart output ??
It means an HTML is opened in MSExcel ...
|
|
|
|
|
|
onyang2 wrote: Do you Smoke Marijuana?Frown Frown OMG OMG Cool
Some people thinks a piece of crap a smart output...
|
|
|
|
|
Abhishek Sur wrote: Do you Smoke Marijuana?Frown Frown OMG
You Didnt Answer the Question My Frnd..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
No Comments.
|
|
|
|
|
Take it easy. We learn by mistakes. Especially when new errors arise. I need a glass of milk or water.
Thanks I have known Response cannot work with ajax
|
|
|
|
|
onyang2 wrote: Take it easy
Its ok budd...
onyang2 wrote: We learn by mistakes.
Even I have learned a lots of things while answering questions ..
|
|
|
|
|
you're obviously clueless, so it is not a good idea to alienate one of the most helpful people on this forum
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You plainly have no idea what you're doing. Buy a book and read it.
Here's a clue - if you did this outside AJAX, it would do a download, inside an AJAX call, it's not going to work because the browser ( by your request ) is not processing a new request.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks Outside Ajax it works. I was preventing post backs by placing all controls in the panel. I need a book,, Borrow me yours
|
|
|
|
|
*grin* sure, come over and I'll be happy to lend it to you.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Actually, more and more you want to simplify your job, more and more complex your job be.
Peoples render the html from Gridview and download it with .xls extension . Excel opens this... But I personally think it is better to generate excel output from actual data.
Use this :
Working with MS Excel(xls / xlsx) Using MDAC and Oledb[^]
to generate Excel files. I think you need to have PostBack trigger to download the file properly from inside the updatepanel.
|
|
|
|
|
Hello,
I have made two tables in SQL server : one is tblogin and 2nd is Details.
i want to have the information in the details view in the web form which is opened after successfull login .And that information must be correspondent to the login form.
|
|
|
|
|
Sounds so trivial that you don't even need to write code to do it. Why can't you do it ? What have you tried ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
In login web form, i have bound login database,
In another web form that opens after successful login, i have bound "details" database.
and. login database have 1 PK cloumn i.e. UserId which is the foreign Key column in details table...
Now , I want to access the information from the details table from UserId corresponding to Id of the login table . i mean ,form must always show the details of the ID that has been logged in, from the details table that is bound the web form
|
|
|
|
|
OK - so it sounds like perhaps you need to write your own SQL to achieve what you want ? Do you know anything about SQL ? Do you know how to use ADO.NET to connect to a database ? Although I said you can probably do it without writing code, the fact is that no professional solution would work that way.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Retain the logged in user's id (through session maybe). Fire a query on the details table to get the data for the logged in user. Display it on the page.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
During Login process place a sessionkey of current userid into session from User table.
If you details Id is UserId you can easily fetch from session :
"SELECT * FROM DETAILS WHERE ID = " + Session["UserID"]
Use SqlCommand object to fire the query and get the output.
Finally Bind the output with any UIElement you want to .
Before you do any code read about ADO.NET first so that you know what you are doing. You might follow this link :
ADO.NET Tutorial[^]
|
|
|
|
|
Make ur fundas strong in Sql and ADO.net , otherwise Developement would be a big headache for you
|
|
|
|
|
hi,
There are many ways to do this, like as
you should bind your detailsview through login session, so that only login user details will be display
Farogh Haider
Web developer
|
|
|
|
|
Hello every one,
I have 7 month of experience in .Net ,but still i am not getting good
job. One of my friend did a course of SEO.she is having good package.
Please some one tell me .whats the SEO .What's the career in this field.Should i switch in this field,What's the future in this field.
please guide me.
|
|
|
|
|
You are in wrong forum and you may get flamed.
rinku soni 23 wrote: I have 7 month of experience in .Net ,but still i am not getting good
Have you thought about why is this before planning to change the domain? I am not sure about SEO, but IMO, it's a sh*tty job.
Best wishes,
Navaneeth
|
|
|
|
|
rinku soni 23 wrote: I have 7 month of experience in .Net ,but still i am not getting good
job.
An IT course takes four years. Did you do a course and THEN spend 7 months working in .NET ? Or did you start to learn programming 7 months ago ?
rinku soni 23 wrote: Please some one tell me .whats the SEO .What's the career in this field.Should i switch in this field,What's the future in this field.
Sounds like a crappy job to me.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|