|
I have to make change in EXCEL, not ACCESS.
SO how to define a primary key in Excel?
Or any other way to update the excel?
|
|
|
|
|
i am working on HR Project in which all the past and current details of employees shld be present at my project,last i heve seen code in this website alowing checkbox in datagrid there is name space i declaired but when i trying to declair assembly it shows erre that system can not find specified. and where can i get help acording to my HR project ITS apearens [templet] and codes .i have vs 2005 n 2.0 .net framework.
|
|
|
|
|
I am not sure where you are putting this code, or why you expect it to work. There are plenty of articles on using checkboxes in grids.
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.
|
|
|
|
|
Hello All,
I am creating a class in C# for some functionality and later consuming it in my ASP.Net application.
I have written Try-Catch blocks in that class.
If an exception occurs, i want to display some message to user in Alert Box.
I am trying to generate alert box from below code
catch(System.Exception ex)
{
Response.Write("<script>alert('" + ex.Message + "');</script>");
}
But its showing compile time error : "The name 'Response' does not exist in the current context"
Am i missing something?
Thanks,
Nagendra.
modified on Wednesday, September 9, 2009 2:40 AM
|
|
|
|
|
That's odd. Where are you writing this code ? Not in a page class, I assume, otherwise the Response object would be there.
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.
|
|
|
|
|
Hi,
I am writting this code in a C# class.
But i solved the above error by writting :
catch(System.Exception ex)
{
HttpContext.Current.Response.Write("<script>alert('" + ex.Message + "');</script>");
}
But its not showing Alert Box on exception.
|
|
|
|
|
nagendrathecoder wrote: But its not showing Alert Box on exception.
Are you sure code is hitting the exception? Put a break point and check that first.
|
|
|
|
|
Yes it is showing exception.
Its also going over that alert box code but still alert box is not displayed.
If i am just writing the exception on page like
HttpContext.Current.Response.Write(ex.Message);
its showing the exception but not the alert box.
|
|
|
|
|
Use this....
Page page = HttpContext.Current.Handler as Page;
if (page != null)
{
ScriptManager.RegisterStartupScript(page, page.GetType(), "msg", "alert('Hi..')", true);
}
|
|
|
|
|
I tried but its showing error: "The name 'ScriptManager' does not exist in the current context"
|
|
|
|
|
Everyone is assuming you're writing script inside your page. That you're not, is bad design. You should fix that, catch the exception in your presentation layer, and do it there. I agree, using the script manager is a good idea. It is an object on the page class, so you can access it 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.
|
|
|
|
|
nagendrathecoder wrote: But i solved the above error by writting :
Yeah, that looks like it could work. However, it's bad form for your non presentation layer to be pumping out HTML. You'd do better to catch the exception in the presentation layer and put your code there.
nagendrathecoder wrote: But its not showing Alert Box on exception.
Have you checked the HTML to make sure your javascript is being inserted ?
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.
|
|
|
|
|
ok, now i am passing my exception as a string to presentation layer and trying to show alert box there, but its still not working.
|
|
|
|
|
OK, did you do the other stuff I suggested ? I agree with the person who said to use RegisterClientScriptBlock. Then you need to check to see if the script is being passed into the HTML or not. If it's not there, then that's your issue. if it is, you need to work out why it does not display ( I would have expected it to )
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.
|
|
|
|
|
I am getting this string as my script
string msg ="<script language=JavaScript>alert('Violation of PRIMARY KEY constraint 'PK_BOMDetail'. Cannot insert duplicate key in object 'dbo.BOMDetail'.\r\nThe statement has been terminated.');</script>";
RegisterClientScriptBlock("Hello", msg);
Its still not showing.
|
|
|
|
|
Guess what, its worked.
The single quotes was troubling me.
Thanks for all your help.
|
|
|
|
|
If any row gets changed, deleted, added etc in dataset and we use DataSet.Acceptchanges(), then all the changes committed in dataset. The RowState property of each DataRow also changes; Added and Modified rows become Unchanged, and Deleted rows are removed.
After DataSet.Acceptchanges(), no row is in changed position now. Now after this if we want to transfer the changes to live database, it will not happen because dataset is showing that no changes have taken place in it.
So make sure that you don’t use DataSet.Acceptchanges() if you want to transfer the changes to live database.
So when and why to use Dataset.accpetchanges()
|
|
|
|
|
I have host my web application and when I try to login from form i get this error
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
What is in issue?! Can be .NET Framework version?!
How can I solve this problem?
|
|
|
|
|
Well, you could start by reading the error. Are you in a webfarm ? Are you in a cluster ?
Beyond that, you could try this[^].
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.
|
|
|
|
|
Hi,I figured out.
All problem was at server name in which I should gave IP Address,I have contact support of hosting provider and they sent me answer and my problem is solved.
Thanks for your time.
|
|
|
|
|
Hello
I have a website which I think it has not a good appearance. Please help me. Does anyone know a method to make website beautiful and attractive?
Does anyone know a good and new template for website?
Note that my website is formal and personal.
sincerely
|
|
|
|
|
hasani2007 wrote: Does anyone know a method to make website beautiful and attractive?
You have to use CSS for that.
if you want to make it more Rich, use SilverLight or Flex
hasani2007 wrote: Does anyone know a good and new template for website?
asp.net free website templates[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Apply CSS,
Use Style to each tags, Apply Skin to Server controls etc.
You can also use Templates..
See this
ASP.NET Free Templates[^]
|
|
|
|
|
what is this doing in web.config .. what if i remove this
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
|
|
|
|
|
What do you think it might do ? Why might you do it ?
the word dependant means, that it's something that's required, you depend on it.
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.
|
|
|
|