|
Guys, I found something but still I get errors.
Code.
Protected Sub GridView1_RowUpdated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdatedEventArgs) Handles GridView1.RowUpdated
Dim cm As New OleDbCommand
Dim con As New OleDbConnection
Dim str1 As String = "Provider = Microsoft.Jet.oledb.4.0; Data source =C:\Documents and Settings\Kagisho.Mashiloane.ALFRGIS\My Documents\Visual Studio 2005\Projects\Search AL\TelephoneList.mdb"
Dim str2 As String
con = New OleDbConnection(str1)
con.Open()
str2 = "select * From Extensions"
cm = New OleDbCommand(str2, con)
Dim updateSQL As String = "UPDATE Extension SET Name = @Name, " & "Surname = @Surname, " & "Xtension = @Xtension"
cm.Parameters.Clear()
cm.Parameters.Add("@Name", Name)
cm.Parameters.Add("@Surname", Surname)
cm.Parameters.Add("@Xtension", Xtension)
cm.ExecuteNonQuery()
'Next
lblUpdatemessage.Text = "Update Successfull"
kagiso
|
|
|
|
|
I am getting "Server Application Unavailable" error when trying to browse the Web application.
Can any one tell me how to solve this Error?
and in the event log
Failed to initialize the AppDomain:/LM/W3SVC/1/ROOT/DataEditor
Exception: System.IO.FileLoadException
Message: Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Access is denied.
StackTrace: at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstance(String assemblyName, String typeName)
at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
-- modified at 5:53 Monday 19th November, 2007
|
|
|
|
|
Reddy Prakash wrote: I am getting "Server Application Unavailable"
Goto your Event viewer to find out where is the problem
|
|
|
|
|
Reinstall your Framework, then IIS. It will solve your problem
|
|
|
|
|
Abhijit Jana wrote: Reinstall your Framework, then IIS
Too long run. Will it be better to find the reason which caused the problem before doing such things ?
|
|
|
|
|
yes, it is long prcedure...but it will solve the problem, cause i have face the same problem that he raised.
|
|
|
|
|
You need to check if the ASP.NET 2.0 framework is installed on the machine you are trying to run the application....
|
|
|
|
|
|
I want to display columns dynamically(based on dates selected in dropdown).
I selected 15/11/2007 AND 17/11/2007. it displays only those 3days..
FromDate: 15/11/2007(selected from dropdown) toDate:17/11/2007(selected from Dropdown)
when I click on button it shoul display in gridview like..
-------------------------------------------------------
productId Name 15/11/2007 16/11/2007 17/11/2007
------------------------------------------------------
1 aaaa sucess fail success
2 bbbb fail fail success
--------------------------------------------------------
If I select in the range from 15/11/16 to 16/11/2007 it should display only 2 days columns).
----------------------------------------
productId Name 15/11/2007 16/11/2007
-------------------------------------------
1 aaaa sucess fail
2 bbbb fail fail
--------------------------------------------
can any one give me solution? am using asp.net 2.0 and c#
|
|
|
|
|
Hi,
I will tell u how to do this on datagrid. The same thing u can implement on gridview. set property AutogenerateColumns="true". Based up on the drop down selection return a dataset from backend and directly bind it to the datagrid.
Ur dataset may contain 4 columns i.e.,
ProductId Name 15/11/2007 16/11/2007 17/11/2007
or 3 columns i.e.,
ProductId Name 15/11/2007 16/11/2007 Based on ur selection.
Hope my solution will give u what u wanted.
Raj
|
|
|
|
|
Hi,
On button click call function to bindgrid in that u can add columns.
BoundField bfield = new BoundField();
bfield.DataField = "empno";<br />
bfield.HeaderText = "Emp No";<br />
GridView1.Columns.Add(bfield);<br />
GridView1.DataSource= MyDataTable;<br />
GridView1.DataBind();<br />
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
Hi friends
I need to send the user billing address details to google checkout page.
if any one has some article or links plz forward me.
thanks
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi,
I am having my .net application in C drive. I have a image control on my .aspx page. At run time I want to bind a image to this image control from D drive which is out application context. Please give me some tips to achieve this.
Thanks in advance.
Raj
|
|
|
|
|
You can't, an ASP.NET app cannot look above it's root. Move the file
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Christian Graus,
Using FileStream class i will establish a file stream to that file. Later i will declare a Byte[] datatype. then using binaryreader(filestream object,Byte[]) i will convert the image file and then i will show this to my image control. It has worked. But this solution is time consuming. Most of my users access my application thru dial up connection.To display 9000 photos it will take so much of time.
I am searching for a better solution. Please if u find one other than the above let me know
Thank u in advance,
Raj
|
|
|
|
|
raj@code wrote: Using FileStream class i will establish a file stream to that file.
I don't think that ASP.NET can access the file which is stored outside the domain.
|
|
|
|
|
Use the Absolute Image path to display the Image. I would suggest you to store the Absolute path in a common place like web.config or resource file and access it from there.
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
John Prabhu wrote: I would suggest you to store the Absolute path in a common place like web.config or resource file and access it from there.
Even if this is done, ASP.NET won't be able to access it, because it's out of root.
|
|
|
|
|
I thought that physical path can be used to display the Images. I was wrong.
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Why don't you create a virtual directory inside the application domain for the Images folder which is in the D Drive, so that you can refer the Images using the virtual path. I'm not quite sure... you can give a try...
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
how to create a attractive menu bar in asp.net web page.
coolsatty
|
|
|
|
|
|
get it Dynamic Drive Menu
bEst Regard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
How can we change security setting of Trusted Sites programmatically. For example enabling ActiveX Control and Plugins enabling or disabling or setting it to prompt.
Please tell me how i can do that ?
thanks
destined to win
|
|
|
|
|
You cannot change the browser setting or install the Activex Control programmatically without the user's consent. No scripting language will allow you to do this due to security reasons.
-- modified at 5:08 Monday 19th November, 2007
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|