|
Guffa wrote: Well, he posted in the ASP.NET forum...
Grin
|
|
|
|
|
A page object only lives while the response is created on the server. Once the response has been created and sent to the browser, the page object goes away.
If you declare a variable in the page object, it will only live as long as the page object lives. Once the response is sent to the browser and the page object goes away, the variable doesn't exist any more.
When you press the button, a new request is sent to the server, a new page object is created to handle the request, and the new page object contains a new instance of the variable that is assigned the initial value of zero.
Web pages are stateless. If you want to keep a value between requests, you have to either send the value back and forth between the server and the browser (using a cookie, viewstate or a hidden field), or assign it to a session variable.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hi...
If u want to keep total count of some thing...
use static variables...
Aswini
|
|
|
|
|
Problem : Need to enter password in which there may be atleast one special character between 2 to 6 position of input string
I dont need this in Javascript (Need only regular expression)
Vikky
|
|
|
|
|
Hi....
use this expression..
[a-z,0-9]{2}[special characters][a-z,0-9]{4}[special characters][a-z,0-9]*
1st 2 char are from a to z or 0 to 9...
[special characters] -- define special char here
same for the next chars...
Aswini
|
|
|
|
|
I have to generate the nested gridview.in order to do it, is it mandatory that i have to drag drop the sql datasouce?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: is it mandatory that i have to drag drop the sql datasouce?
No it's not mandatory. SQLDataSource is for newbies which makes things very easy. You can put a template column on the main gridview and put another gridview inside the template column. On GridViews' RowDatabBound event, find the child GridView and bind it.
|
|
|
|
|
i am doing in the Folowing manner
protected void gvCars_rowDataBound(object sender, GridViewRowEventArgs e)<br />
{<br />
if (e.Row.RowType == DataControlRowType.DataRow)<br />
{<br />
GridView gv = (GridView)e.Row.FindControl("gvModels");<br />
AccessDataSource asd = new AccessDataSource(@"App_Data\SkinSample.mdb", "SELECT carmodel_name,carmodel_engine,carmodel_color FROM carmodel WHERE carmaker_id=" + ((DataRowView)e.Row.DataItem)["carmaker_id"].ToString());<br />
gv.DataSource = asd;<br />
gv.AutoGenerateColumns = false;<br />
BoundField bfModelName = new BoundField();<br />
bfModelName.DataField = "carmodel_name";<br />
BoundField bfEngine = new BoundField();<br />
bfEngine.DataField = "carmodel_engine";<br />
BoundField bfColor = new BoundField();<br />
bfColor.DataField = "carmodel_color";<br />
gv.Columns.Add(bfModelName);<br />
gv.Columns.Add(bfEngine);<br />
gv.Columns.Add(bfColor);<br />
gv.DataBind();<br />
}<br />
}
seems a little busy process because i have 15000 rows and doing paging @ 10
Sir , I have to show it in something like , there is a button in gridview in each row, on clicking the button at the particular row , it should view it's pertaining information into the same row.
i think , i should use the edit item template ?
-- modified at 2:14 Friday 16th November, 2007
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: i should use the edit item template ?
No you can show the inner gridview on click of a button without any postback using javascript. Put your inner Gridview inside a HTML <div> element and make it's visibility to none . Assigns a JS function to the button which changes this div's display status to block . It will be very easy for the user to view the records.
Sonia Gupta wrote: AccessDataSource asd = new AccessDataSource(@"App_Data\SkinSample.mdb", "SELECT carmodel_name,carmodel_engine,carmodel_color FROM carmodel WHERE carmaker_id=" + ((DataRowView)e.Row.DataItem)["carmaker_id"].ToString());
This is not at all a secure method. You have to use parameterized queries which won't cause SQL injection problems.
Sonia Gupta wrote: i have 15000 rows and doing paging @ 10
In performance perceptive, selecting 15000 records and doing paging is not recommended. You need to look into custom paging.
|
|
|
|
|
i am writing into an XML file using Response.WriteFile
but its showing an XMl file as output..
how do i convert this file into RSS ?
alok2171
|
|
|
|
|
alok2171 wrote: how do i convert this file into RSS ?
I didn't understood what you mean ? Do you want to write an XML file in RSS structure ? RSS follows a standardized structure for XML files. To show this interactively, use XSLT.
|
|
|
|
|
alok2171 wrote: how do i convert
this file into RSS ?
Actually, RSS is a XML file with the RSS specific tag.. Please take a look at this link "What Is RSS?" to get more idea.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hi Guys
Need advises, On my develop PC i am able to generate Excel Reports. However once port to an server this Error Occur :Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
In my Development PC I have already add reference of the Excel object 11. How come when i port to server it can't be detected. I am using VS 2005
Need Help urgently
Thanks A million
KaKaShi HaTaKe
|
|
|
|
|
HatakeKaKaShi wrote: How come when i port to server it can't be detected. I am using VS 2005
maybe. you doesn't add this dll in your setup... So, what you can do now is that you upload this dll on the server and register it or adding it into GAC. or..install Microsoft Office on the server
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
But 'Microsoft.Office.Interop.Excel does not have dll right cos i can't seem to find it. where to get the dll of this and how to adding in to GAC?
Need helps man
Thanks A lot of million
KaKaShi HaTaKe
|
|
|
|
|
As Shujaat suggested, "Copy Local" might work but you need to re-package your setup file.. "Interop.Excel.dll" should be under bin\debug folder.
HatakeKaKaShi wrote: how to adding in to GAC
sorry. you don't need to add it in to GAC as this dll is COM..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Check The properties of dll you added and verify that Copy Local property is set to true.If not make it true and rebuild your Application.
Shujaat
|
|
|
|
|
However , i can't seem to set the copy local property to true... May i know how to set it
Thanks
KaKaShi HaTaKe
|
|
|
|
|
Go to Solution Explorer There must be node with name References under this node you will get all the dlls you have added in your project now select the required dll right Click on it and go to properties now You would see the Copy Local property set it to true.
Shujaat
|
|
|
|
|
Hi,
I have recently encountered the same problem on my PC, my local IIS server would work with OWC11 but the remote server would not.
What ended up being the case is that the interop DLL was not installed on the remote server's GAC (global assembly cache).
One way to check and see if the Remote server has the correct interop in its GAC is to go onto your remote server, go into Start->Run (it has to be run because Explorer can't browse to it) and type in "C:\windows\assembly\gac". An Explorer window should appear, and if a folder named "Microsoft.Office.Interop.Excel" exists on the remote server, then my suggestion won't help. But, if this folder is missing, you can copy that directory from your local GAC to the Remote server's GAC.
A direct copy of the folder from PC to PC works; I had to do this when I was installing my application on my remote server.
I hope this helps,
Mitch
-- modified at 0:51 Friday 16th November, 2007
|
|
|
|
|
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154.
Hi i did what you mention but after that i gotten this error .
May i know what's the error
Thanks
A Million
KaKaShi HaTaKe
|
|
|
|
|
I had never experienced that error myself.
One suggestion that I will give to you to try and run "regsvr32 dllname.dll" on the DLL that you are using to interface with Excel (this is not the interop DLL that you just copied across).
When I did this on my server, I had to run "regsvr32 OWC11.DLL" to get it to work, however, the DLL that you have to register might be under a different name.
I hope this helps,
Mitch
|
|
|
|
|
What do u mean by run "regsvr32 dllname.dll" on the DLL? How to do that
Please guide
Thanks a million
KaKaShi HaTaKe
|
|
|
|
|
Hi,
Is the COM component that you added a reference to in your VS .Net project on the remote server as well?
If it isn't you will also have to install that COM component on the server.
If it is on the server, open up Command Prompt on the server, and change the directory to the location of that COM DLL.
Then, in the command prompt type in "regsvr32 COMDLLNAME.dll" and press enter.
You should get a messagebox saying that the DLL was registered correctly. Press OK, and try your ASP project again.
Eg, When I did this on my server, I had used the OWC11.dll as the reference to the charting controls. So, once I had located the DLL on the remote server, I had to manually register the COM dll using "regsvr32 OWC11.dll" in command prompt.
I hope this helps,
Mitch
|
|
|
|
|
I used the above method in the end the message was Entry point Not found
Any solutions?
KaKaShi HaTaKe
|
|
|
|