|
|
dear all
can we draw graphs using asp.net/c#.net?
please reply
najeed
|
|
|
|
|
|
I am using bitmap class to check the dimensions of the file I mean height and width.
Dim bm as new bitmap(filepath)
bm.height
bm.width
Now the problem is when the path contains file of extention .jpg or some orte extentions it occurs an exception .Can you please tell me another way by which the dimensions of any type of image file can be find out.
|
|
|
|
|
Hi,
I am using office XP and i want to read the contents of the Word or excel file into my aspx page.
I have tried by using Response.contenttyp but it shows a dialog box asking if i want to save or open the file.
I want to just read the contents of the the file no editing or manipulation of the data.
how can this be achived.
Thanks in Advance.
Deepak Surana
|
|
|
|
|
imports system.io
dim file as new fileinfo("path")
dim str as string = file.readtoend
|
|
|
|
|
Thanks Amaneet but this does not solves the problem. If possible can you please provide the code in C#.
|
|
|
|
|
Hi all,
I have two problems
1)I want to show more than one field value in single row in single line.
means,I want to show Id,Custname on single one line
2)I want to show two or more field lines in single datagrid row.
means,I want to show Id,Custname line and Salary,Experience line in One Datagrid Row
I hope you understand my problem,and expect help from you.
Thanks,
Teach Life To laugh........
-- modified at 1:42 Thursday 15th June, 2006
|
|
|
|
|
Can u plz explain ur problem a little bit more?
-- modified at 1:26 Thursday 15th June, 2006
|
|
|
|
|
You can use template column in the grid with two labels to display 2 fields
use <br> to display it in other line
<asp:TemplateColumn HeaderText="F1 & F2" HeaderStyle-Wrap="false">
<HeaderStyle Width="15%"></HeaderStyle>
<ItemStyle Width="15%"></ItemStyle>
<ItemTemplate>
<asp:label runat="server" Visible="True" id="lblF1" Text='<%# DataBinder.Eval(Container.DataItem, "F1") %>'>
</asp:label> <br> <asp:label runat="server" Visible="True" id="lblF2" CssClass="default_text" Text='<%# DataBinder.Eval(Container.DataItem, "F2") %>'>
</asp:label>
</ItemTemplate>
</asp:TemplateColumn>
|
|
|
|
|
Great!
Thanks for your help......
Back soon.......Bye
Teach Life To Laugh........
|
|
|
|
|
Hi..
I wrote the following code to count my website visitors:
(In the Global.asax)
protected static int m_ActiveUsers;
public static int ActiveUsers
{
get
{ return m_ActiveUsers;
}
}
protected void Application_Start(Object sender, EventArgs e)
{
Application.Lock();
m_ActiveUsers=0;
Application.UnLock();
}
protected void Session_Start(Object sender, EventArgs e)
{
Application.Lock();
++m_ActiveUsers;
Application.UnLock();
}
protected void Session_End(Object sender, EventArgs e)
{
Application.Lock();
--m_ActiveUsers;
Application.UnLock();
}
But the problem it doesnt give me the right number always.Some times this code tells me there is two visitors while there is no one except me.And some times it doesnt decrement the visitors count number when i exit.
Do any one know how to make a better way that wont be affected by application errors and will solve my problem?
"I am too late but i will never give up"
|
|
|
|
|
The problem is because session_onEnd event will not be fired while you logged out of the application or closes the window. (on session end)
|
|
|
|
|
Thank you for your respond...
If this is true(closing the window by a user wont fire Session_onEnd event)what should i do?
1-Decrease the timeout attribute of the sessionstate in web.config file?.
2-Use another event handler(other than Session_End handler )?.
"I am too late but i will never give up"
|
|
|
|
|
Please go through this article.I hope it will help you.
http://codebetter.com/blogs/brendan.tompkins/archive/2005/01/25/48325.aspx
|
|
|
|
|
I read the article.It is very useful but there are some problems that still exist for example using File menu>close to close the Browser window or transfer to another website in the same window.
"I am too late but i will never give up"
|
|
|
|
|
I have 2 textbox and 2 listbox.What I want is when I click on add button all the values of textbox and listbox should get displayed in DataGrid.Then I add a new Record and Datagrid should get refresh with the new record.It should not earse the pervious record.
Finally when I clicked on Save button I need to save all the rows of Datagrid into the Database.
Please help me.
Thanks and Regards.
|
|
|
|
|
Hi,
What you can do is to create a datatable and add the records to that table when you are click add new button. Bind the datagrid with that datatable and refresh it on clicking of add new. Finally on click of save save all the content of the datagrid to the database.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi varshavmane,
I had similar kind of job sometimes earlier. If you dont want a post back on clicking of the ADD button then problem arises. For that you have to add some 'hidden textboxes' to your form.When you click on the ADD button add a new row to the datagrid through javascript ,which is quite easy,and put newly added values to the new datagrid row as well as add your records to the hidden textboxes by comma(,) separator.The newly added row and its values will not be traced by the server, its only for show purpose.You can add as many records as you want.Now finally when you click on the SAVE button take the old records from the datagrid and new records from the hidden textboxes and save them to the database.
In this process you will have only one postback. Otherwise on every click on the ADD button(when creating new records) will cause a postback.
Tirthadip
|
|
|
|
|
No actually I have to use viewstate as I dont have to display the data into datagrid but may need to modify the data.Then Tracing the record into the hidden textbox will be very difficult.
So please help me with Viewstate.
Thanks and Regards.
|
|
|
|
|
Ok then Apurba's idea is good.But keep the datatable to a session varible.Why are u using viewstate?Hope it will solve your problem.
Tirthadip
|
|
|
|
|
Hi,
I respect your idea and Apurba's but actually problem with the session is that I will have to distore session when I exit that form so I dont want to use.
I have never used Viewstate so I want some help/code which stores all the texbox and listbox values in viewstate and how can I retrival the data from viewstate.
Thanks and regards.
varshavmane
|
|
|
|
|
Hi,
Thats not a problem you can use viewstate to store the datatable.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
Thanks for the reply.But can u please tell me the syntax of storing the datatable in viewstate.As when I dont use viewstate my datatable gets refresh and because of which I lose the pervious record.
Also how to retrive the values from viewstate for datatable.
I have not used viewstate so I need to try this.
Thanks and regards.
|
|
|
|
|
Hi,
It is quite simple. To put into viewstate you can use:
ViewState["daa"]=ds;
and to retrieve you can use:
DataSet s = new DataSet();<br />
s = (DataSet)ViewState["daa"];<br />
Response.Write(s.Tables[0].Rows[0][0].ToString());
Although here i have used dataset, same way you can use for datatable.
Best Regards,
Apurva Kaushal
|
|
|
|