Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Wednesday, March 28, 2012

Why there is no *.aspx.designer.vb files in Visual studio 2005?

On my computer windows XP, I use visual studio 2005 for development. I create a atlas project for my work.

Everytime when I create a new aspx or ascx file, there is no *.aspx.designer.vb file. But on some other computers(same environment), when create a new webform, VS will gerenate 3 files:

*.aspx, *.aspx.vb., *.aspx.designer.vb

Why? any settings related to this issue?

Hi,

the *.aspx.vb will not generate if you unselect checkbox "Place code in separate file" when you create a web form.

hope can help you.


Thanks for you reply. I knew that.

But I am not taliking about *.aspx.vb, I am talking about *.aspx.designer.vb

This *.aspx.designer.vb will hold all control variables declared in page *.aspx


Hi,

The computer where you can see the aspx.designer.vb file has the addin "Visual Studio 2005 Web Application Projects" available athttp://msdn.microsoft.com/asp.net/reference/infrastructure/wap/default.aspx. Be aware that by installing the addin you do loose some feature at the moment like "profile", there is a work around available also, check the code project to get the addon.

Hope this helps you.

PS: I hope that microsoft changes there mind on the designer files, i love partial classes but i do not like loosing view of the main class.

VBS1


Thanks.

So if aspx.designer.vb is invisible on my computer under a wep application inside a solution, anyway can find out this aspx.designer.vb file for webform?

Why web robots cant request aspx pages in Ajax project ?

When Icreate aspx pages in Ajaxproject googlebot, yahoo-slurp and other crawlers can’t see these pages.

I’vecreated two test sites to show the problem:

Pagewithout Ajax:http://test.cky.pl/noajax/Default.aspx

Page with Ajax:http://test.cky.pl/ajax/Default.aspx

In browserI can see both of these pages. But when I try to saw what web robot can seewhen it requests my page (I was using this page and other tools (result wasthis same):http://www.smart-it-consulting.com/internet/google/googlebot-spoofer/index.htm

For Ajax page I was gettingerror massage:Invalid URL or serverdoes not respond, HTTP return code: 500

For normalaspx page everything is ok.

If someone couldshow me solution for this problem and could explain me why robots can’t requestAjax pages Iwould be very thankful.

Have you found a solution for this yet? I also noticed the same problem. If you point the W3C link validator at an AJAX site, it just says HTTP 500 internal server error. You get the same problem if you use an link checking package such as Xenu. If you view the page in your browser, it's fine.

This concerns me as I'm heavily involved in SEO - will Googlebot see the same and not index the site...


OK, found a workaround. Add this to Page.Init:

if (Request.Browser.Crawler ==true || Request.Browser.W3CDomVersion.ToString() !="1.0" || Request.Browser.Type.ToString().Contains("Opera")){ ScriptManager1.EnablePartialRendering =false;}else{ ScriptManager1.EnablePartialRendering =true;}

Thanks a lot, it's helps.

wiki vsi corrupt?

Having successfully downloaded and installed the blank project and hands-on-lab VSIs, I find that if I download and try to install ASPNETAtlasWikiRC.vsi I get an "Unknown stream header byte sequence" error.
I've downloaded this on another machine to see if it was a corrupt download and I get the same problem. I've also tried opening it from VS2005RC and Visual Web Dev 2005 Express and both give the same error.
Any ideas?
Thanks,
Ian
Oops - having posted this I discovered that I'm not the first to write on this topic, but will leave it here in the hope that it will help to hurry things along!I am experinecing the same...both on a Win2k machine and a XP Pro machine...Hopefully it will be corrected soon.
Thanks.
WI

Monday, March 26, 2012

Will new controls run in VB project

I notice that the November Control Toolkit controls are written in c#.
Can they be added to a VB project?
Thanks in advance.
Glenn Michael

Found the answer in the FAQ for the forum. Please excuse the post...

Without installing Atlas, Website application is not working in IE

Hello,

I am developing Website Application using VS 2005 with .NET 2.0 and Atlas June CTP. I am using Atlas framework in the existing project. Hence I have added reference of Atlas.dll and modified Web.config

In the project, I have one user control (ascx) and one aspx page. The user control is included in aspx page. The user control has two dropdown lists. The second list is getting populated depends upon the selected value from first list. This is done by using Atlas. The UpdateControl is added into this page. The Script manager is added in aspx page.

If the application is launched on the machine where Atlas is installed, it works only on that machine in both browsers (IE and FireFox). It is not working if anybody accesses this website remotely through browser from machine where Atlas is not installed.

If the application is launched on the machine where Atlas is not installed and accessed the local website through browser, the "SelectedIndexChanged" event is not getting triggered. If I add "ScriptLibrary" folder in the application, it is working in FireFox but not in IE. In this case,do I need to add any assemblies apart from Atlas.dll to make it work in IE and without installing Atlas?

Thanks in advance,

Milind

hello. the atlas dll is the only thing you need to have in your bin folder to get the updatepanel working. btw, how are you accessing the web site from the machine that has the app installed? are you using localhost/... or localhost: portnumber/... (ie, are you using the internal server or IIS when you access the site on the server?)


Hello,
I am accessing localhost using IIS.
On the test machine (where Atlas is not installed), if I deploy website application which has Atlas.dll and ScriptLibrary folder, "SelectedIndexChanged" event is getting triggered for FireFox but not in IE.

Thanks,
Milind

hello again.

weird stuff...btw, is this a public url we can see?

Wednesday, March 21, 2012

Write to database using AJAX

Hello, everyone. I'm trying to finish up a project where users store information into our sales database. It would be immensely helpful to be able to insert this data (or update the data) without refreshing the page, which I can only imagine would use AJAX. Unfortunately, I'm having a hard time finding the proper information on how to do this. Is there a handy little AJAX control that helps with this? Is it something I'll have to write myself? Any hints, suggestions and/or pointings in the right direction would be greatly appreciated.

not sure on what you have, but you do have several options:

1. use web services to do that. you'd call them through your page by using js proxies that can be automatically inserted on the page.

2. use an updatepanel to wrap parts of the page that should be refreshed.


Luis Abreu:

1. use web services to do that. you'd call them through your page by using js proxies that can be automatically inserted on the page.

This is precisely what I'm going to try to use. Seems cleaner to me and I think I understand it better than the updatepanel. Thanks for the information! I really appreciate it.


hello again.

yes, if you ask me, the correct way of using ajax it to use web services to get the data and then js to update the dom presented by the browser. anyway, you cannot deny that the UpdatePanel has some cool things and it'll work nicely in several scenarios.

Wrong EventName triggers. How come?

Hi

In the project I have two GridViews: master GridView1 and slave GridView2. The latter resides on the UpdatePanel with properties as follows:

AsynchPostBack ControlID=GridView1

EventName=SelectedIndexChanging

It works fine: if I select a row from GridView1, partial postback takes place and GridView2 re-populated

But! If I set GridView1.AllowSorting=true and click on any of GridView1 titles, it goes again with the partial postback! I don't have my GridView1.Sorting event handler in the list of UpdatePanel.ControlID but it acts as well it is.

How can I prevent a partial postpack in the case above? I need my page be sent as full old-way post back, when click on the GridView1 headers.

Hi Mabanza,

Mabanza:

But! If I set GridView1.AllowSorting=true and click on any of GridView1 titles, it goes again with the partial postback! I don't have my GridView1.Sorting event handler in the list of UpdatePanel.ControlID but it acts as well it is.

this sounds like you've let UpdatePanels UpdateMode on the default valueAllways. Please set it toConditional.


This relates to the children updates. Anyway, I did, no effect.

This boiled down to the follows, actually. I can not register the title (which is LinkButton on the server) as

RegisterPostBackControl(LinkButton);

It works the same wrong way - as partial post back.

How to register LinkButton for full postback?

Thanks.


May try use another way to go. Instead declaring the SelectedIndexChanging event as trigger, use in the SelectedIndexChanched event updatepanelsUpdate() method. eg.

void GridView1_SelectedIndexChanged(Object sender, EventArgs e){// Your logic here UpdatePanel1.Update();}

So you be sure, updatepanel only updates on changing the selected index from your gridview.


Good idea. But it does not suit me. I have

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest) andadd_beginRequest(StartRequest) hooked.

If I update panel on the server side, I won't be able to use that, right?

Thanks.


Mabanza:

If I update panel on the server side, I won't be able to use that, right?

not sure about that. To put it bluntly, i'm not a fan from javascriptCool Anyway.

Mabanza:

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest) andadd_beginRequest(StartRequest) hooked.

I dont now where in the page lifecycle these events are fired, but for updating the gridview after page index changing, a roundtrip to the server is required. From my point, let the javascript beginRequest and endRequest events still active, give the UpdatePanel.Update method a try and look whats up on your page.