Showing posts with label developing. Show all posts
Showing posts with label developing. Show all posts

Saturday, March 31, 2012

The best file format to import/export data into sql database through asp.net application

Hi,

We are developing a SQL server based asp.net application. As part of
requirement we should allow users import/export some relational data through
web user interface. We are investigation which file format would be the most
efficient format to import export relational data.

So far we came up with two options: XML and Access MDB files and we prefer
MDB files.

Is there any better file format for import/export data?

Any help would be appreciated,
MaxThe format is not part of the requirements ? What is the exact purpose ?

IMO users are more used to spreadsheet files rather than to xml or even
Access files. Of course it depends if the overall goal is to import/export
data to automated systems or if this is to allows users to handle those
files by themselves in a familiar tool...

My personal default preference would be likely Excel files but your berst
bet is liekly to ask them what they intend to do with those files...

--
Patrice

"Max2006" <alanalan1@dotnet.itags.org.newsgroup.nospama crit dans le message de news:
OtaUPQpCIHA.464@dotnet.itags.org.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

Hi,
>
We are developing a SQL server based asp.net application. As part of
requirement we should allow users import/export some relational data
through web user interface. We are investigation which file format would
be the most efficient format to import export relational data.
>
So far we came up with two options: XML and Access MDB files and we prefer
MDB files.
>
Is there any better file format for import/export data?
>
Any help would be appreciated,
Max
>
>
>


CSV is what I would pick.

"Max2006" <alanalan1@dotnet.itags.org.newsgroup.nospamwrote in message
news:OtaUPQpCIHA.464@dotnet.itags.org.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

Hi,
>
We are developing a SQL server based asp.net application. As part of
requirement we should allow users import/export some relational data
through web user interface. We are investigation which file format would
be the most efficient format to import export relational data.
>
So far we came up with two options: XML and Access MDB files and we prefer
MDB files.
>
Is there any better file format for import/export data?
>
Any help would be appreciated,
Max
>
>
>


I see nothing wrong with MDB as asp.net has a data provider for it. You can
read it directly into SQL Server using dataset, I would think.

David
"Max2006" <alanalan1@dotnet.itags.org.newsgroup.nospamwrote in message
news:OtaUPQpCIHA.464@dotnet.itags.org.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

Hi,
>
We are developing a SQL server based asp.net application. As part of
requirement we should allow users import/export some relational data
through web user interface. We are investigation which file format would
be the most efficient format to import export relational data.
>
So far we came up with two options: XML and Access MDB files and we prefer
MDB files.
>
Is there any better file format for import/export data?
>
Any help would be appreciated,
Max
>
>
>


CSV (Comma Separated Values) is generally considered to be the most
platform-agnostic file format.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"Max2006" wrote:

Quote:

Originally Posted by

Hi,
>
We are developing a SQL server based asp.net application. As part of
requirement we should allow users import/export some relational data through
web user interface. We are investigation which file format would be the most
efficient format to import export relational data.
>
So far we came up with two options: XML and Access MDB files and we prefer
MDB files.
>
Is there any better file format for import/export data?
>
Any help would be appreciated,
Max
>
>
>
>

the best pratice to save lot of data

hi there people...
im developing an application where i need 190 input text, in 8
diferent forms..
anyone can tell me the best pratice to save the the data while edit
the others forms?
viewstate?
sessions?
or database in each "next" click?
Tobias Ramos
Belo Horizonte MG
Brasil"Tobias[br]" <l_tobias@dotnet.itags.org.terra.com.br> wrote in
news:987dj0do51v3gv5hlojv7tpg7aoqb0fkce@dotnet.itags.org.
4ax.com:

> hi there people...
> im developing an application where i need 190 input text, in 8
> diferent forms..
> anyone can tell me the best pratice to save the the data while edit
> the others forms?
> viewstate?
> sessions?
> or database in each "next" click?
I would probably use a database... so users can come back in the future to
finish off the survey.
You can tag each user with a Cookie to look up their saved results.
Lucas Tam (REMOVEnntp@dotnet.itags.org.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
[url]http://members.ebay.com/aboutme/spot18/[/url]
Hi,
Viewstate: - Not possible as you have user specific data for each instances
of the form.
Database: - very expensive operation as you have to save & retrieve for each
form you have filled in.
Session: - Appropriate for this scenario.
Regards
Joyjit
"Tobias[br]" <l_tobias@dotnet.itags.org.terra.com.br> wrote in message
news:987dj0do51v3gv5hlojv7tpg7aoqb0fkce@dotnet.itags.org.
4ax.com...
> hi there people...
> im developing an application where i need 190 input text, in 8
> diferent forms..
> anyone can tell me the best pratice to save the the data while edit
> the others forms?
> viewstate?
> sessions?
> or database in each "next" click?
> Tobias Ramos
> Belo Horizonte MG
> Brasil
First, I would probably store the data in a HashTable to make it easy to
access and use the field ID names as the index field.
I would probably use session state to store this hash table if I did not
expect much heavy traffic. If traffic is a concern, then you can push it to
the database serializing the hashtable to a blob. You could even use a MS
Access database for that as long as you are in a "one" web server as opposed
to a server farm.
Rocky Moore
www.HintsAndTips.com / Now with GMail Queue - Share your tips - Earn rewards
www.MyQuickPoll.com / 2004 Election poll ID #33
www.RJSoft.com/Products/RJContentPanel/ - Free web user template content
control!
"Tobias[br]" <l_tobias@dotnet.itags.org.terra.com.br> wrote in message
news:987dj0do51v3gv5hlojv7tpg7aoqb0fkce@dotnet.itags.org.
4ax.com...
> hi there people...
> im developing an application where i need 190 input text, in 8
> diferent forms..
> anyone can tell me the best pratice to save the the data while edit
> the others forms?
> viewstate?
> sessions?
> or database in each "next" click?
> Tobias Ramos
> Belo Horizonte MG
> Brasil

the best pratice to save lot of data

hi there people...

im developing an application where i need 190 input text, in 8
diferent forms..
anyone can tell me the best pratice to save the the data while edit
the others forms?
viewstate?
sessions?
or database in each "next" click?

Tobias Ramos
Belo Horizonte MG
Brasil"Tobias[br]" <l_tobias@dotnet.itags.org.terra.com.br> wrote in
news:987dj0do51v3gv5hlojv7tpg7aoqb0fkce@dotnet.itags.org.4ax.com:

> hi there people...
> im developing an application where i need 190 input text, in 8
> diferent forms..
> anyone can tell me the best pratice to save the the data while edit
> the others forms?
> viewstate?
> sessions?
> or database in each "next" click?

I would probably use a database... so users can come back in the future to
finish off the survey.

You can tag each user with a Cookie to look up their saved results.

--
Lucas Tam (REMOVEnntp@dotnet.itags.org.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Hi,

Viewstate: - Not possible as you have user specific data for each instances
of the form.

Database: - very expensive operation as you have to save & retrieve for each
form you have filled in.

Session: - Appropriate for this scenario.

Regards
Joyjit

"Tobias[br]" <l_tobias@dotnet.itags.org.terra.com.br> wrote in message
news:987dj0do51v3gv5hlojv7tpg7aoqb0fkce@dotnet.itags.org.4ax.com...
> hi there people...
> im developing an application where i need 190 input text, in 8
> diferent forms..
> anyone can tell me the best pratice to save the the data while edit
> the others forms?
> viewstate?
> sessions?
> or database in each "next" click?
> Tobias Ramos
> Belo Horizonte MG
> Brasil
First, I would probably store the data in a HashTable to make it easy to
access and use the field ID names as the index field.

I would probably use session state to store this hash table if I did not
expect much heavy traffic. If traffic is a concern, then you can push it to
the database serializing the hashtable to a blob. You could even use a MS
Access database for that as long as you are in a "one" web server as opposed
to a server farm.

--
Rocky Moore
www.HintsAndTips.com / Now with GMail Queue - Share your tips - Earn rewards
www.MyQuickPoll.com / 2004 Election poll ID #33
www.RJSoft.com/Products/RJContentPanel/ - Free web user template content
control!

"Tobias[br]" <l_tobias@dotnet.itags.org.terra.com.br> wrote in message
news:987dj0do51v3gv5hlojv7tpg7aoqb0fkce@dotnet.itags.org.4ax.com...
> hi there people...
> im developing an application where i need 190 input text, in 8
> diferent forms..
> anyone can tell me the best pratice to save the the data while edit
> the others forms?
> viewstate?
> sessions?
> or database in each "next" click?
> Tobias Ramos
> Belo Horizonte MG
> Brasil

Wednesday, March 28, 2012

The best way to display a panel of ads?

Hey everyone,

I am developing an online store application. I got stuck in one thing, which is how to build an ad area in the home page. For example: if you go to amazon.com you will see in top or in the side an area with let say 20 different ads (Dell,Microsoft,cingular, Sears, TJMAX,etc …..)For different companies. Each ad will appear randomly every 5 seconds. What is the best and most efficient way to accomplish such thing? And would you please provide me with an example!. Also can I have flash ad integrated in my VS2005 application? I am using ASP.Net 2.0

Your input will be truly appreciated!

i am going out on a limb here, because i have yet to really experiment with this. so i cannot testify to its usefulness nor can i provide any examples, but this may be what you are looking for. throw this link into your browser and check it out:

ms-help://MS.VSExpressCC.v80/MS.NETFramework.v20.en/dv_vwdcon/html/a307f03e-6bbd-4ec3-96ef-5b7188ba5eb9.htm

but, i came across this one day and marked it in my fav's to get back to once i am finished with the project i am currently on. hope it helps, and if it does, let me know.

thanks and good luck


http://aspnet.4guysfromrolla.com/articles/033104-1.aspx

Hope above will be helpful.


Google out about the ASP.NET 2.0 AdRotator control. Its XML based & easy to implement & handle.


I guess using Ad Rotator will be the best option.

However, you will get a new ad on after the page gets refreshed. Basically it will get ad from either an XML file (if u wish to have static list and can edit it manually) else ads can come from DB. You can have a small screen to add Ads.

Popo


Pls check outwww.constructionkerala.com......

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

publicpartialclassMasterPage : System.Web.UI.MasterPage

{

protectedvoid Page_Load(object sender,EventArgs e)

{

GridView1.PageSize =Utilities.ToInt(ConfigurationManager.AppSettings["subListCount"]);

if (Request.QueryString["td"] !=null && Request.QueryString["td"].Trim() !="")

hidSelectedTd.Value ="td_" + Request.QueryString["td"];

int subCategory=Request.QueryString["sub"]==null || Request.QueryString["sub"]=="" ? 0:Utilities.ToInt(Request.QueryString["sub"]);

System.Collections.Generic.List<Advertisement> advList =Advertisement.SelectAll(subCategory,Location.Top.ToString());

if (advList.Count > 0)

litImage.Text =Advertisement.BindAdds(advList[0].Image, advList[0].Width.ToString(), advList[0].Height.ToString());

}

protectedvoid GridView1_DataBound(object sender,EventArgs e)

{

Session["sub"] = GridView1.DataKeys[0][0];

}

protectedvoid lnkSearch_Click(object sender,EventArgs e)

{

if (txtSearch.Text !="")

Response.Redirect("SearchResult1.aspx?cont="+txtSearch.Text +"&type=" + cmbSearch.Text);

}

}

=======================

<%@dotnet.itags.org.MasterLanguage="C#"AutoEventWireup="true"CodeFile="MasterPage.master.cs"Inherits="MasterPage" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>.:Master:.</title>

<script>

var subCat=0;

function onSubMouseOver(e){

document.getElementById(e.id).style.background="url(images/subOver.jpg)";

document.getElementById(e.id).style.backgroundRepeat="no-repeat"

document.getElementById("divToolTip").style.visibility="visible";

document.getElementById("divToolTip").innerHTML=document.getElementById(e.id).innerHTML;

document.getElementById("divToolTip").style.left=event.x+10;

document.getElementById("divToolTip").style.top=event.y+5;

}

function onSubMouseOut(e){

document.getElementById(e.id).style.background="url(images/subNormal.jpg)";

document.getElementById(e.id).style.backgroundRepeat="no-repeat"

document.getElementById("divToolTip").style.visibility="hidden";

}

function window_onload() {

document.getElementById("divToolTip").style.visibility="hidden";

document.getElementById("divImages").style.visibility="hidden";

}

function onSubCategory(url){

aspnetForm.action=url;

aspnetForm.submit();

}

</script>

<script>

var img="";

var imgLeft="";

var imgRight="";

var tdLeft;

var tdRight;

function link_onMouse(link){

selTdId=document.getElementById("<%=hidSelectedTd.ClientID%>").value;

selTd=document.getElementById(selTdId);

if(link.id==selTdId)

return;

tdLeft=document.getElementById("td_" + (parseInt(link.id.split("_")[1])-1).toString());

tdRight=document.getElementById("td_" + (parseInt(link.id.split("_")[1])+1).toString());

//Store current Styles

img=link.style.backgroundImage;

imgLeft=tdLeft.style.backgroundImage;

imgRight=tdRight.style.backgroundImage;

//set New Style

//Current

link.style.backgroundImage="url(linkImages/link_Over.jpg)";

//Left

if(link.id=="td_10")//Search

tdLeft.style.backgroundImage="url(linkImages/search_Over_L.jpg)";

elseif(link.id=="td_12" && selTdId=="td_10")//Login

tdLeft.style.backgroundImage="url(linkImages/search_Sel_login_Over.jpg)";

elseif(link.id=="td_12")//Login

tdLeft.style.backgroundImage="url(linkImages/login_Over_L.jpg)";

elseif(link.id=="td_14" && selTdId!="td_12")//Feedback

tdLeft.style.backgroundImage="url(linkImages/feedback_Over_L.jpg)";

elseif("td_" + (parseInt(tdLeft.id.split("_")[1])-1).toString()==document.getElementById("<%=hidSelectedTd.ClientID%>").value)

tdLeft.style.backgroundImage="url(linkImages/linkOver_L_Sel_R.jpg)";

else

tdLeft.style.backgroundImage="url(linkImages/linkOver_L.jpg)";

//Right

if(link.id=="td_10" && selTdId!="td_12")//Search

tdRight.style.backgroundImage="url(linkImages/search_Over_R.jpg)";

elseif(link.id=="td_10" && selTdId=="td_12")

tdRight.style.backgroundImage="url(linkImages/search_Over_login_Sel.jpg)";

elseif(link.id=="td_12" && selTdId!="td_14")//Login

tdRight.style.backgroundImage="url(linkImages/login_Over_R.jpg)";

elseif(link.id=="td_12" && selTdId!="td_14")

tdRight.style.backgroundImage="url(linkImages/login_Over_fdbk_Sel.jpg)";

elseif(link.id=="td_7")

tdRight.style.backgroundImage="url(linkImages/link_firstEnd_R_Over.jpg)";

elseif(link.cellIndex+2==selTd.cellIndex)

tdRight.style.backgroundImage="url(linkImages/linkOver_R_Sel_R.jpg)";

else

tdRight.style.backgroundImage="url(linkImages/linkOver_R.jpg)";

}

function link_onMouseOut(link){

selTdId=document.getElementById("<%=hidSelectedTd.ClientID%>").value;

if(link.id==selTdId)

return;

link.style.backgroundImage=img;

tdLeft.style.backgroundImage=imgLeft;

tdRight.style.backgroundImage=imgRight;

}

function Search(){

// var val=document.getElementById("<%=txtSearch.ClientID%>").value;

// //val = val.replace(/^\s*/,"");

// //val = val.replace(/\s*$/,"");

// while(val.indexOf("'")>-1)

// val = val.replace("'","");

// if(val != ""){

// var field=document.getElementById("<%=cmbSearch.ClientID%>").value;

// // var sub=<%=Request.QueryString["sub"]==null || Request.QueryString["sub"]=="" ? "0" : Request.QueryString["sub"] %>

//aspnetForm.action="SearchResults.aspx?td=10&field=" + field + "&val=" + val + "&sub=" + sub ;

aspnetForm.action="sa.aspx";

aspnetForm.submit();

//}

}

</script>

<linkhref="StyleSheet2.css"rel="stylesheet"type="text/css"/>

<metaname="keywords"content="Construction Kerala, Construction, About Construction,About Construction Kerala, Intellectual Publications , All Kerala Building Materials And Construction Dictionary, Building Materials And Construction Dictionary"/>

<metaname="Description"content="We are confident that continued cooperaton of our customers, we shall bring out exhaustive and timely editions of ABCD year after year."/>

</head>

<bodyleftmargin="0"topmargin="0"rightmargin="0"bottommargin="0"language="javascript"onload="return window_onload()">

<formid="form1"runat="server">

<div>

<tablealign="center"bgcolor="#ffffff"border="0"cellpadding="0"cellspacing="0"

style="width: 760px; height: 420px">

<tr>

<tdcolspan="3"height="72">

<tableborder="0"cellpadding="0"cellspacing="0"style="width: 100%; height: 72px">

<tr>

<tdwidth="240">

<imgsrc="images/banner_01.jpg"/></td>

<tdbgcolor="#ffd078"width="100%"align="center">

<asp:LiteralID="litImage"Text=""runat="server"></asp:Literal>

</td>

<tdwidth="284">

<imgsrc="images/banner_03.jpg"/></td>

</tr>

</table>

</td>

</tr>

<tr>

<tdcolspan="3"height="5">

</td>

</tr>

<tr>

<tdcolspan="2"height="18"style="padding-left: 4px">

<tableborder="0"cellpadding="0"cellspacing="0"width="100%">

<trheight="18">

<tdid="td_1"style="background-image: url(linkImages/linkhome_L.jpg); width: 3px;

background-repeat: repeat-x">

<ahref="Default.aspx">

<imgalt="Home"border="0"src="linkImages/home.jpg"style="text-decoration: underline"/></a>

</td>

<tdid="td_2"class="linkNormalRight"style="color: #000000">

</td>

<tdid="td_3"align="center"class="linkNormal"onmouseout="link_onMouseOut(this)"

onmouseover="link_onMouse(this)"style="color: #000000">

<ahref="CompanyList.aspx?cat=1&td=3"title="Services">Products</a>

</td>

<tdid="td_4"class="linkNormalRight">

</td>

<tdid="td_5"align="center"class="linkNormal"onmouseout="link_onMouseOut(this)"

onmouseover="link_onMouse(this)">

<ahref="CompanyList.aspx?cat=2&td=5"title="Products">Services</a>

</td>

<tdid="td_6"class="linkNormalRight">

</td>

<tdid="td_7"align="center"class="linkNormal"onmouseout="link_onMouseOut(this)"

onmouseover="link_onMouse(this)">

<ahref="Aboutus.aspx?td=7"title="About Us">About Us</a>

</td>

<tdid="td_8"class="linkFirstEndNormal">

</td>

<!-- Search -->

<tdbgcolor="#d0d0d0"style="background-image: url(linkImages/search_Left.jpg); background-repeat: no-repeat;

height: 18px"align="center">

<asp:TextBoxID="txtSearch"runat="server"CssClass="search"Height="15px"Width="50%"></asp:TextBox>

in

<asp:DropDownListID="cmbSearch"runat="server"CssClass="cmb"Height="15px"Width="30%">

<asp:ListItemValue="Title">Name</asp:ListItem>

<asp:ListItem>Place</asp:ListItem>

<asp:ListItem>District</asp:ListItem>

</asp:DropDownList>

</td>

<tdid="td_9"style="background-image: url(linkImages/search_L.jpg); width: 4px;

background-repeat: no-repeat">

</td>

<tdid="td_10"align="center"class="linkNormal"onmouseout="link_onMouseOut(this)"

onmouseover="link_onMouse(this)">

<asp:LinkButtonID="lnkSearch"runat="server"ForeColor="black"OnClick="lnkSearch_Click"CausesValidation="False">Search</asp:LinkButton>

</td>

<tdid="td_11"style="font-size: 8pt; background-image: url(linkImages/search_R.jpg);

width: 22px; background-repeat: repeat-x">

</td>

<!-- Last Links -->

<tdid="td_12"align="center"class="linkNormal"onmouseout="link_onMouseOut(this)"

onmouseover="link_onMouse(this)"style="font-size: 8pt">

<ahref="UserLogin.aspx?td=12"title="Login">Login</a>

</td>

<tdid="td_13"style="background-image: url(linkImages/login_R.jpg); width: 16px;

background-repeat: no-repeat">

</td>

<tdid="td_14"align="center"class="linkNormal"onmouseout="link_onMouseOut(this)"

onmouseover="link_onMouse(this)">

<ahref="feedback.aspx?td=14&sub=<%=Request.QueryString["sub"]%>"title="Feedback">Feedback</a>

</td>

<tdid="td_15"style="background-image: url(linkImages/feedback_R.jpg); width: 3px;

background-repeat: no-repeat">

</td>

</tr>

</table>

</td>

<tdbgcolor="#f5f2f2"rowspan="2"width="144"valign="top"align="center">

<asp:DataListID="dlstAdds"runat="server"DataSourceID="odsAdds">

<ItemTemplate>

<%#Advertisement.BindAdds((string)Eval("Image"),Eval("Width").ToString(),Eval("Height").ToString())%>

</ItemTemplate>

</asp:DataList><asp:ObjectDataSourceID="odsAdds"runat="server"SelectMethod="SelectAll"

TypeName="Advertisement">

<SelectParameters>

<asp:QueryStringParameterName="subDirectoryID"QueryStringField="sub"Type="Int32"/>

<asp:ParameterDefaultValue="R"Name="location"Type="String"/>

</SelectParameters>

</asp:ObjectDataSource>

</td>

</tr>

<tr>

<tdstyle="background-image: url(images/subBack.jpg); background-repeat: repeat-y"

valign="top"width="144">

<asp:GridViewID="GridView1"DataKeyNames="ID"runat="server"AllowPaging="True"

AutoGenerateColumns="False"CellPadding="0"DataSourceID="odsSubcategory"GridLines="None"

PageSize="3"ShowFooter="True"ShowHeader="False"Width="144px"OnDataBound="GridView1_DataBound">

<Columns>

<asp:TemplateField>

<ItemTemplate>

<ahref="javascript:onSubCategory('CompanyList.aspx?sub=<%#Eval("ID")%><%=Request.QueryString["cat"]!=null && Request.QueryString["cat"]!=""?"&cat="+Request.QueryString["cat"]:"" %>&td=<%=Request.QueryString["td"] %>')">

<divid='divItem<%#Eval("ID") %>'class="divItemNormal"onmouseout="onSubMouseOut(this)"

onmouseover="onSubMouseOver(this)">

<%#Eval("Name") %>

</div>

</a>

<script>

if(subCat==0)

subCat=<%#Eval("ID") %>;

</script>

</ItemTemplate>

<FooterTemplate>

<%if (Request.QueryString["sub"] ==null && Request.QueryString.Count>0)

{%>

<script>

try{

document.getElementById("divItem<%=GridView1.DataKeys[0][0]%>").className="divItemSelected";

document.getElementById("divItem<%=GridView1.DataKeys[0][0]%>").onmouseover="";

document.getElementById("divItem<%=GridView1.DataKeys[0][0]%>").onmouseout="";

}

catch(e){}

</script>

<%}

else

{ %>

<script>

try{

document.getElementById("divItem<%=Request.QueryString["sub"]%>").className="divItemSelected";

document.getElementById("divItem<%=Request.QueryString["sub"]%>").onmouseover="";

document.getElementById("divItem<%=Request.QueryString["sub"]%>").onmouseout="";

}

catch(e){}

</script>

<%} %>

</FooterTemplate>

</asp:TemplateField>

</Columns>

<PagerStyleCssClass="subFooter"HorizontalAlign="Right"/>

<PagerSettingsFirstPageImageUrl="~/images/btnFirst.jpg"LastPageImageUrl="~/images/btnLast.jpg"

Mode="NextPreviousFirstLast"NextPageImageUrl="~/images/btnNext.jpg"PreviousPageImageUrl="~/images/btnPrev.jpg"/>

</asp:GridView>

</td>

<tdstyle="padding-right: 5px; padding-left: 5px; padding-bottom: 3px; padding-top: 5px"

valign="top"width="472"height="225">

<asp:ContentPlaceHolderID="ContentPlaceHolder1"runat="server">

</asp:ContentPlaceHolder>

</td>

</tr>

<tr>

<tdcolspan="3"height="25"style="padding-left: 5px; background-color: #ffcc66">

<spanstyle="font-family: Times New Roman">?</span>

2007 constructionkerala.com.

All rights reserved. <br/>

<spanstyle="font-size: 8pt">Site Designed and maintained by<ahref="http://www.infoprismsolutions.com"

style="color: #ffffff"target="_blank">infoprismsolutions.com</a></span>

</td>

</tr>

</table>

</div>

<asp:ObjectDataSourceID="odsSubcategory"runat="server"SelectMethod="SelectAll"

TypeName="SubCategory">

<SelectParameters>

<asp:QueryStringParameterDefaultValue="1"Name="categoryID"QueryStringField="cat"

Type="Int32"/>

</SelectParameters>

</asp:ObjectDataSource>

<asp:HiddenFieldID="hidSelectedTd"runat="server"Value="td_3"/>

<br/>

<divid="divToolTip"style="left: 5px; top: 507px">

</div>

<divid="divImages"style="visibility:hidden;">

<imgsrc="images/subOver.jpg"/><imgsrc="linkImages/feedback_Over_L.jpg"/>

<imgsrc="linkImages/feedback_R.jpg"/>

<imgsrc="linkImages/feedback_Sel_L.jpg"/>

<imgsrc="linkImages/feedback_Sel_R.jpg"/>

<imgsrc="linkImages/link.jpg"/>

<imgsrc="linkImages/link_firstEnd_R.jpg"/>

<imgsrc="linkImages/link_firstEnd_R_Over.jpg"/>

<imgsrc="linkImages/link_firstEnd_R_Sel.jpg"/>

<imgsrc="linkImages/link_L.jpg"/>

<imgsrc="linkImages/link_Over.jpg"/>

<imgsrc="linkImages/link_R.jpg"/>

<imgsrc="linkImages/link_Sel.jpg"/>

<imgsrc="linkImages/linkhome_L.jpg"/>

<imgsrc="linkImages/linkOver_L.jpg"/>

<imgsrc="linkImages/linkOver_L_Sel_R.jpg"/>

<imgsrc="linkImages/linkOver_R.jpg"/>

<imgsrc="linkImages/linkOver_R_Sel_R.jpg"/>

<imgsrc="linkImages/linkSelected_L.jpg"/>

<imgsrc="linkImages/linkSelected_R.jpg"/>

<imgsrc="linkImages/login_Over_fdbk_Sel.jpg"/>

<imgsrc="linkImages/login_Over_L.jpg"/>

<imgsrc="linkImages/login_Over_R.jpg"/>

<imgsrc="linkImages/login_R.jpg"/>

<imgsrc="linkImages/login_Sel_L.jpg"/>

<imgsrc="linkImages/login_Sel_R.jpg"/>

<imgsrc="linkImages/search_L.jpg"/>

<imgsrc="linkImages/search_Left.jpg"/>

<imgsrc="linkImages/search_Over_L.jpg"/>

<imgsrc="linkImages/search_Over_login_Sel.jpg"/>

<imgsrc="linkImages/search_Over_R.jpg"/>

<imgsrc="linkImages/search_R.jpg"/>

<imgsrc="linkImages/search_Sel_L.jpg"/>

<imgsrc="linkImages/search_Sel_login_Over.jpg"/>

<imgsrc="linkImages/search_Sel_R.jpg"/></div>

<script>

//Set Default State

selTdId=document.getElementById("<%=hidSelectedTd.ClientID%>").value;

selTd=document.getElementById(selTdId);

selTd.className="linkSelected";

//left

if(selTdId=="td_10")//search

document.getElementById("td_9").style.backgroundImage="url(linkImages/search_Sel_L.jpg)";

elseif(selTdId=="td_12")//Login

document.getElementById("td_11").style.backgroundImage="url(linkImages/login_Sel_L.jpg)";

elseif(selTdId=="td_14")//Feedback

document.getElementById("td_13").style.backgroundImage="url(linkImages/feedback_Sel_L.jpg)";

else

document.getElementById("td_" + selTd.cellIndex.toString()).className="linkSelectedLeft";

//right

if(selTdId=="td_10")//search

document.getElementById("td_11").style.backgroundImage="url(linkImages/search_Sel_R.jpg)";

elseif(selTdId=="td_12")//Login

document.getElementById("td_13").style.backgroundImage="url(linkImages/linkSelected_R.jpg)";

elseif(selTdId=="td_14")//Feedback

document.getElementById("td_15").style.backgroundImage="url(linkImages/feedback_Sel_R.jpg)";

elseif(selTdId!="td_7")

document.getElementById("td_" + (selTd.cellIndex+2).toString()).className="linkSelectedRight";

else

document.getElementById("td_" + (selTd.cellIndex+2).toString()).className="linkFirstEndSelected";

</script>

</form>

</body>

</html>

====================================================================================================================

In Administrrative mode--

<%@dotnet.itags.org.PageLanguage="C#"AutoEventWireup="true"CodeFile="AddSettings.aspx.cs"Inherits="AddSettings" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>AddSettings</title>

</head>

<bodytopmargin="0"leftmargin="0">

<formid="form1"runat="server">

<table>

<tr>

<tdstyle="width: 100px">

<tablewidth="100%">

<tr>

<tdstyle="width: 100px">

<imgsrc="images/banner_01.jpg"/></td>

<tdbgcolor="#ffd078"style="width: 6467%">

</td>

<tdstyle="width: 100px">

<imgsrc="images/banner_03.jpg"/></td>

</tr>

</table>

</td>

</tr>

<tr>

<tdstyle="width: 100px">

<table>

<tr>

<tdstyle="width: 100px"valign="top">

<tablewidth="100%">

<tr>

<tdid="controlPanel"align="center">

Control Panel</td>

</tr>

<tr>

<tdstyle="height: 157px">

<asp:MenuID="menu"runat="server"BackColor="#F7F6F3"CssClass="menu"DynamicHorizontalOffset="2"

EnableTheming="false"Font-Bold="True"Font-Names="Verdana"Font-Size="8pt"ForeColor="#7C6F57"

StaticSubMenuIndent="10px"Width="100%">

<StaticMenuItemStyleHorizontalPadding="5px"VerticalPadding="2px"/>

<DynamicHoverStyleBackColor="#7C6F57"ForeColor="White"/>

<DynamicMenuStyleBackColor="#F7F6F3"/>

<StaticSelectedStyleBackColor="#5D7B9D"/>

<DynamicSelectedStyleBackColor="#5D7B9D"/>

<DynamicMenuItemStyleHorizontalPadding="5px"VerticalPadding="2px"/>

<Items>

<asp:MenuItemNavigateUrl="Admin.aspx"Text="Home"Value="Home"></asp:MenuItem>

<asp:MenuItemNavigateUrl="Login1.aspx"Text="Login"Value="Login"></asp:MenuItem>

<asp:MenuItemNavigateUrl="SubcategoryTest.aspx"Text="Subcategory"Value="Subcategory">

</asp:MenuItem>

<asp:MenuItemNavigateUrl="CompanyList1.aspx"Text="Company"Value="Company">

</asp:MenuItem>

<asp:MenuItemNavigateUrl="FeedbackList.aspx"Text="Feedback"Value="Feedback">

</asp:MenuItem>

<asp:MenuItemNavigateUrl="Login1.aspx"Text="Chat"Value="Chat"></asp:MenuItem>

<asp:MenuItemNavigateUrl="AddSettings.aspx"Text="Advertisements"Value="Advertisements">

</asp:MenuItem>

<asp:MenuItemNavigateUrl="Password.aspx"Text="Security"Value="Security"></asp:MenuItem>

<asp:MenuItemNavigateUrl="Settings.aspx"Text="Settings"Value="Settings"></asp:MenuItem>

</Items>

<StaticHoverStyleBackColor="#7C6F57"ForeColor="White"/>

</asp:Menu>

</td>

</tr>

</table>

</td>

<tdstyle="width: 100px">

<tablewidth="100%">

<tr>

<td>

<asp:RadioButtonListID="rdPage"runat="server"RepeatColumns="2"AutoPostBack="True"

OnSelectedIndexChanged="rdPage_SelectedIndexChanged">

<asp:ListItemSelected="True">Home</asp:ListItem>

<asp:ListItem>General</asp:ListItem>

</asp:RadioButtonList>

</td>

<td>

<asp:DropDownListID="cmbSubcategory"runat="server"DataSourceID="odsSubcategory"

DataTextField="Name"DataValueField="ID"AutoPostBack="True"Visible="False"

OnSelectedIndexChanged="cmbSubcategory_SelectedIndexChanged">

</asp:DropDownList><asp:ObjectDataSourceID="odsSubcategory"runat="server"SelectMethod="SelectAll"

TypeName="SubCategory"></asp:ObjectDataSource>

</td>

</tr>

<tr>

<td>

Location :

</td>

<td>

<asp:DropDownListID="cmbLocation"runat="server"DataSourceID="odsLocation"DataTextField="Name"

DataValueField="Value"CssClass="cmb">

</asp:DropDownList><asp:ObjectDataSourceID="odsLocation"runat="server"SelectMethod="BindLocation"

TypeName="Advertisement"></asp:ObjectDataSource>

</td>

</tr>

<tr>

<td>

Image :

</td>

<td>

<asp:FileUploadID="fileImage"runat="server"/></td>

</tr>

<tr>

<td>

Width :

</td>

<td>

<asp:TextBoxID="txtWidth"runat="server"MaxLength="4"Width="56px"></asp:TextBox></td>

</tr>

<tr>

<td>

Height :

</td>

<td>

<asp:TextBoxID="txtHeight"runat="server"MaxLength="4"Width="56px"></asp:TextBox></td>

</tr>

<tr>

<td>

Link :

</td>

<td>

<asp:TextBoxID="txtLink"runat="server"MaxLength="100"></asp:TextBox></td>

</tr>

<tr>

<td>

Order :

</td>

<td>

<asp:TextBoxID="txtOrder"runat="server"MaxLength="2"Width="56px"></asp:TextBox></td>

</tr>

<tr>

<td>

</td>

<td>

<asp:ButtonID="btnAdd"runat="server"Text="Add"Width="59px"OnClick="btnAdd_Click"/></td>

</tr>

<tr>

<tdcolspan="2">

<asp:GridViewID="gvAdds"runat="server"AllowPaging="True"AutoGenerateColumns="False"

BackColor="White"BorderColor="#999999"BorderStyle="None"BorderWidth="1px"

CellPadding="3"GridLines="Vertical"DataSourceID="odsAdds"DataKeyNames="ID"OnRowUpdating="gvAdds_RowUpdating"OnRowDataBound="gvAdds_RowDataBound"OnRowEditing="gvAdds_RowEditing">

<Columns>

<asp:TemplateFieldHeaderText="Image"SortExpression="Image">

<EditItemTemplate>

<%#Advertisement.BindAdds((string)Eval("Image"),Eval("Width").ToString(),Eval("Height").ToString())%>

</EditItemTemplate>

<ItemTemplate>

<%#Advertisement.BindAdds((string)Eval("Image"),Eval("Width").ToString(),Eval("Height").ToString())%>

</ItemTemplate>

<ItemStyleWidth="100px"/>

</asp:TemplateField>

<asp:BoundFieldDataField="Width"HeaderText="Width"/>

<asp:BoundFieldDataField="Height"HeaderText="Height"/>

<asp:TemplateFieldHeaderText="Location"SortExpression="Location">

<EditItemTemplate>

<asp:DropDownListID="gvcmbLocation"runat="server"DataSourceID="odsLocation"DataTextField="Name"

DataValueField="Value"CssClass="cmb">

</asp:DropDownList>

</EditItemTemplate>

<ItemStyleWidth="75px"/>

<ItemTemplate>

<asp:LabelID="Label1"runat="server"Text='<%# Bind("Location") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:BoundFieldDataField="Link"HeaderText="Link"SortExpression="Link">

<ItemStyleWidth="150px"/>

</asp:BoundField>

<asp:BoundFieldDataField="Order"HeaderText="Order"SortExpression="Order">

<ItemStyleWidth="25px"/>

</asp:BoundField>

<asp:TemplateFieldShowHeader="False">

<ItemTemplate>

<asp:LinkButtonID="LinkButton1"runat="server"CausesValidation="False"CommandName="Edit"

Text="Edit"></asp:LinkButton>

<asp:LinkButtonID="lnkDelete"runat="server"CausesValidation="False"CommandName="Delete"

Text="Delete"></asp:LinkButton>

</ItemTemplate>

<ItemStyleWidth="75px"/>

<EditItemTemplate>

<asp:LinkButtonID="lnkUpdate"runat="server"CausesValidation="False"CommandName="Update"

Text="Update"></asp:LinkButton>

<asp:LinkButtonID="LinkButton2"runat="server"CausesValidation="False"CommandName="Cancel"

Text="Cancel"></asp:LinkButton>

</EditItemTemplate>

</asp:TemplateField>

</Columns>

<FooterStyleBackColor="#CCCCCC"ForeColor="Black"/>

<RowStyleBackColor="#EEEEEE"ForeColor="Black"/>

<SelectedRowStyleBackColor="#008A8C"Font-Bold="True"ForeColor="White"/>

<PagerStyleBackColor="#999999"ForeColor="Black"HorizontalAlign="Center"/>

<HeaderStyleBackColor="#000084"Font-Bold="True"ForeColor="White"/>

<AlternatingRowStyleBackColor="Gainsboro"/>

</asp:GridView>

<asp:ObjectDataSourceID="odsAdds"runat="server"OnSelecting="odsAdds_Selecting"

SelectMethod="SelectAll"TypeName="Advertisement"DataObjectTypeName="Advertisement"

DeleteMethod="Delete"UpdateMethod="Update"OnUpdating="odsAdds_Updating">

<SelectParameters>

<asp:ControlParameterControlID="cmbSubcategory"DefaultValue="0"Name="subDirectoryID"

PropertyName="SelectedValue"Type="Int32"/>

</SelectParameters>

</asp:ObjectDataSource>

</td>

</tr>

<tr>

<td>

</td>

<td>

</td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

<tr>

<tdstyle="width: 100px">

2007 Info Prism Solutions . All rights reserved. <br/>

<spanstyle="font-size: 8pt"> Centre Point, M G Road, Thrissur - 4 0487

- 2387546, 6543322 visit us -<ahref="http://www.infoprismsolution.com"target="_blank">

infoprismsolution.com</a> </span></td>

</tr>

</table>

</form>

</body>

</html>

=================================================================

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

publicpartialclassAddSettings : System.Web.UI.Page

{

#region Fields

Advertisement add =null;

Location loc;

publicstring selLoc;

#endregion

#region Methods

privatevoid UploadFile(string id)

{

string ext = System.IO.Path.GetExtension(fileImage.PostedFile.FileName);

string path = Server.MapPath("Adds") +"\\" +"Add_" + id + ext;

fileImage.PostedFile.SaveAs(path);

}

publicstring GetSize(string file)

{

string size ="";

System.Drawing.Image img =new System.Drawing.Bitmap(Server.MapPath("Directoryweb")+"\\Adds\\" + file);

size ="Width=" + (img.Width > 100 ? 100 : img.Width).ToString();

size +="Height=" + (img.Height > 100 ? 100 : img.Height).ToString();

return size;

}

#endregion

#region Event Handlers

protectedvoid Page_Load(object sender,EventArgs e)

{

//Client.CheckAuthorisation(Roles.Admin);

}

protectedvoid btnAdd_Click(object sender,EventArgs e)

{

if (btnAdd.Text =="Add")

{

add =newAdvertisement();

add.Image = System.IO.Path.GetExtension(fileImage.PostedFile.FileName);

add.Width =Utilities.ToInt(txtWidth.Text.Trim());

add.Height =Utilities.ToInt(txtHeight.Text.Trim());

add.Link = txtLink.Text;

add.Location = (Location)cmbLocation.SelectedValue[0];

add.Order =Utilities.ToInt(txtOrder.Text);

//==== add.Subcategory = rdPage.SelectedValue == "Home" ? null : SubCategory.Select(Utilities.ToInt(cmbSubcategory.SelectedValue));

Advertisement.Insert(add);

UploadFile(add.ID.ToString());

}

gvAdds.DataBind();

}

protectedvoid rdPage_SelectedIndexChanged(object sender,EventArgs e)

{

if (rdPage.SelectedValue =="General")

cmbSubcategory.Visible =true;

else

cmbSubcategory.Visible =false;

gvAdds.DataBind();

}

protectedvoid cmbSubcategory_SelectedIndexChanged(object sender,EventArgs e)

{

gvAdds.DataBind();

}

protectedvoid gvAdds_RowUpdating(object sender,GridViewUpdateEventArgs e)

{

//save Location for update

loc = (Location)((DropDownList)gvAdds.Rows[e.RowIndex].FindControl("gvcmbLocation")).SelectedValue[0];

}

protectedvoid odsAdds_Selecting(object sender,ObjectDataSourceSelectingEventArgs e)

{

if (rdPage.SelectedValue =="Home")

e.InputParameters["subDirectoryID"] ="0";

else

{

string selValue = cmbSubcategory.SelectedValue ==null ?"" : cmbSubcategory.SelectedValue;

cmbSubcategory.DataBind();

if (selValue !="")

cmbSubcategory.SelectedValue = selValue;

e.InputParameters["subDirectoryID"] = cmbSubcategory.SelectedValue;

}

}

protectedvoid odsAdds_Updating(object sender,ObjectDataSourceMethodEventArgs e)

{

((Advertisement)e.InputParameters[0]).Location = loc;

}

protectedvoid gvAdds_RowDataBound(object sender,GridViewRowEventArgs e)

{

DropDownList cmbEditLocation;

if (gvAdds.EditIndex == e.Row.RowIndex && e.Row.RowIndex != -1)

{

cmbEditLocation = (DropDownList)e.Row.FindControl("gvcmbLocation");

if (cmbEditLocation !=null && cmbEditLocation.Items.Count > 0)

cmbEditLocation.SelectedValue = selLoc[0].ToString();

}

}

protectedvoid gvAdds_RowEditing(object sender,GridViewEditEventArgs e)

{

selLoc = ((System.Web.UI.WebControls.Label)gvAdds.Rows[e.NewEditIndex].Cells[3].Controls[1]).Text;

}

#endregion

}


Thank you guys very much. I am going to start working on it tonight! I will update you with what happen :)

I appreciate your input

Monday, March 26, 2012

The connection name ConnectionString was not found in the applications configuration or th

Hi All, I need help. I am developing a very simple ASP.NET Application that retreived some information from an Oracle Database.

The application was working fine, but suddenly it stopped working with the following exception:

"The connection name 'ConnectionString' was not found in the applications configuration or the connection string is empty."

Furthermore, I had backups of the application on my hard drive, and all suddenly stopped working with the same exception. I beieve it is a general Configuration issue ... because all the connections are failing with the same exception.

Following is the excepton, and the line where the exception is given:

Line 55:
Line 56:
Line 57: <asp:SqlDataSource ID="SqlDataSource42" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString42%>"
Line 58: ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
Line 59: SelectCommand="Select * from TBORDER_ACTION where customer_id = 'XYZ'">

And again the exception is "The connection name 'ConnectionString' was not found in the applications configuration or the connection string is empty."

Following is my Web.config:

<?xmlversion="1.0"?><!--

Note: As an alternative to hand editing this file you can use the

web admin tool to configure settings for your application. Use

the Website->Asp.Net Configuration option in Visual Studio.

A full list of settings and comments can be found in

machine.config.comments usually located in

\Windows\Microsoft.Net\Framework\v2.x\Config

-->

<configurationxmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<connectionStrings>

<addname="ConnectionString42"connectionString="Data Source=DatabaseInstance;User ID=Username42;Password=Password42;Unicode=True"providerName="System.Data.OracleClient" />

<addname="ConnectionString42m"connectionString="Data Source=DatabaseInstance;User ID=Username;Password=Password42;Unicode=True"

providerName="System.Data.OracleClient" />

</connectionStrings>

<system.web>

<!--

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

Visual Basic options:

Set strict="true" to disallow all data type conversions

where data loss can occur.

Set explicit="true" to force declaration of all variables.

-->

<compilationdebug="true"strict="false"explicit="true"/>

<pages>

<namespaces>

<clear/>

<addnamespace="System"/>

<addnamespace="System.Data"/>

<addnamespace="System.Collections"/>

<addnamespace="System.Collections.Specialized"/>

<addnamespace="System.Configuration"/>

<addnamespace="System.Text"/>

<addnamespace="System.Text.RegularExpressions"/>

<addnamespace="System.Web"/>

<addnamespace="System.Web.Caching"/>

<addnamespace="System.Web.SessionState"/>

<addnamespace="System.Web.Security"/>

<addnamespace="System.Web.Profile"/>

<addnamespace="System.Web.UI"/>

<addnamespace="System.Web.UI.WebControls"/>

<addnamespace="System.Web.UI.WebControls.WebParts"/>

<addnamespace="System.Web.UI.HtmlControls"/>

</namespaces>

</pages>

<!--

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

--> <authenticationmode="Windows"/>

<!--

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

<error statusCode="403" redirect="NoAccess.htm" />

<error statusCode="404" redirect="FileNotFound.htm" />

</customErrors>

--> </system.web>

</configuration>

Please help; I have been stuck with this issue for 1 week...

You have two connections strings with the same name. Is that the problem?


No - I have 2 connection string with 2 different names.

Please advice,

Mahdi


Line 57: <asp:SqlDataSource ID="SqlDataSource42" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString42%>"
Line 58: ProviderName="<%$ ConnectionStrings:ConnectionString42.ProviderName %>"



Dear jfmccarthy,

You are number 1; You are the best. I have been trying 3 days to find an answer, explored many sites, and spent more than 30 hours but could not find the answer.

Your suggestion was correct. I want to realyyyy... thank you, and wish you much success in your life (Although I am sure you are successfull).

Thanks Thanks Thanks...Big Smile


Well thank you very muchEmbarrassed

Saturday, March 24, 2012

the easiest question for any one of you!

can anybody tell me what do i have to do to start working with ASP.NET
... .NET framework 2.0 ... some developing tools...? which is best and
why...? (i curently work with ASP through dreamweaver)
Thanks!www.asp.net
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"eyekoola" wrote:

> can anybody tell me what do i have to do to start working with ASP.NET
> ... .NET framework 2.0 ... some developing tools...? which is best and
> why...? (i curently work with ASP through dreamweaver)
> Thanks!
>
web developer express is the basic version of the Microsoft editors:
http://msdn.microsoft.com/vstudio/express/vwd/
You can also use Dreamweaver with ASP.NET, though I don't know much about
it.
If you are more into class development and such, Visual Studio rocks, but is
quite expensive.
Karl
http://www.openmymind.net/
http://www.fuelindustries.com/
"eyekoola" <eyekoola@.gmail.com> wrote in message
news:e0bhsk$vs7$1@.sunce.iskon.hr...
> can anybody tell me what do i have to do to start working with ASP.NET ...
> .NET framework 2.0 ... some developing tools...? which is best and why...?
> (i curently work with ASP through dreamweaver)
> Thanks!

the easiest question for any one of you!

can anybody tell me what do i have to do to start working with ASP.NET
... .NET framework 2.0 ... some developing tools...? which is best and
why...? (i curently work with ASP through dreamweaver)

Thanks!www.asp.net

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com

"eyekoola" wrote:

> can anybody tell me what do i have to do to start working with ASP.NET
> ... .NET framework 2.0 ... some developing tools...? which is best and
> why...? (i curently work with ASP through dreamweaver)
> Thanks!
web developer express is the basic version of the Microsoft editors:
http://msdn.microsoft.com/vstudio/express/vwd/

You can also use Dreamweaver with ASP.NET, though I don't know much about
it.

If you are more into class development and such, Visual Studio rocks, but is
quite expensive.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/

"eyekoola" <eyekoola@.gmail.com> wrote in message
news:e0bhsk$vs7$1@.sunce.iskon.hr...
> can anybody tell me what do i have to do to start working with ASP.NET ...
> .NET framework 2.0 ... some developing tools...? which is best and why...?
> (i curently work with ASP through dreamweaver)
> Thanks!

The Error

I was developing an ASP.NET web application..and suddenly..i got hungry...i saved everything and closed Visual Studio.Net (2003) ..ate...back to VS.NET..start my application...then..i got this error

Visual Studio cannot create or open the application because the web server on this computer is not running. Start the web server before processing.

Now,this is my whole story..i did nothin to VS ..what should i do

(i found that the web server is running..i stopped it..then restarted it..but in vain...un then re install the iis....restart windows (XP pro) ..and i got the same error)

try running the regiis, that sometimes fixes the problem and you should do it after re-installing iis.

C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i


MxMxM wrote:

I was developing an ASP.NET web application..and suddenly..i got hungry...i saved everything and closed Visual Studio.Net (2003) ..ate...back to VS.NET..start my application...then..i got this error

Visual Studio cannot create or open the application because the web server on this computer is not running. Start the web server before processing.

Now,this is my whole story..i did nothin to VS ..what should i do

(i found that the web server is running..i stopped it..then restarted it..but in vain...un then re install the iis....restart windows (XP pro) ..and i got the same error)

You may just re-start your IIS server.


i tried everything...aspnet_regiis.exe /i ...stop and restart...remove the IIS and add it again..then aspnet_regiis.exe /i ...

Thursday, March 22, 2012

The eternal connection string problem

I am still struggling with a connection string problem.

I have tried a lot of different, and non-working, solutions.

I am developing on a laptop. When I get this the way I want it, I will upload it to my web site. Naturally the physical address is different for the DB file. I am trying to find a solution where I don't have to cut and paste.

I have tried web.config and it works okay for the laptop, but when I upload it and edit the .config to the new address on the server it doesn't work. I just tried the below and it doesn't work either.


Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\wwwroot\AITCdotnet\atad\AlpaIntlTC_BP.mdb;

Doesn't "c:\inetpub\wwwroot" take you to a site root? Shouldn't this point to my site root folder on the server, even if it's on a "D" drive?

Regards,
Is your mdb file stored under your application folder? You may need to use Server.MapPath() method to get the full path to your database at runtime. Instead of storing the full path in web.config, just store the relative path. Get this working on your own machine first.

Jamie,
Thanks for the reply. I have tried variously; Server.MapPath, Path.GetFullPath, and Application.Path to try and "get" the physical path I need. I had no luck using any of those methods in the web.config. I concluded that was due to the fact that is a only an XML/text string file and it wouldn't be "complied" or processed when the .dll read its contents.

The last part of the filename to the .mdb is indeed the same on both the server and the laptop, but its the first part of the address that I am just not getting.

I have assumed that if I run Server.MapPath, that it is related to the directory in which the aspx file that "asked" for it lives. Then anything it returns could be the first half and the known subfolder and filenames could be appended.

Given the connection string I originally posted, can you give me some idea how I should use the Server.MapPath method?

I have read lots of Forum posts, have a whole collection of MS Press and other books, and only seem to find over-simplified or incomplete examples. I can't be the only person on the planet who is trying to solve this problem.

Thanks again.
To answer your questions

www.siteroot.net
AITCdotnet - folder
atad - folder
AlpaIntlTC_BP.mdb
You should call Server.MapPath() from your page class, passing in the database name that is stored in your web.config file.
You have to use Server.MapPath, Application.Path, etc. in your code, not in web.config (I would suggest usingRequest.PhysicalApplicationPath as this will give you the path to your root folder, not to the .aspx file). For example:

 void Page_Load ( Object src, EventArgs eArgs ) {

String ConnPath = Request.PhysicalApplicationPath + ConfigurationSettings.AppSettings ( "ConnPath" );

...
}


I have been working with this approach for 30 hours. I have modifiied it using Server.MapPath since this recent exchange.


Private Sub cnSb()
Dim sbPath As New StringBuilder(200)
sbPath.Append("""")
sbPath.Append("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=")
sbPath.Append(Server.MapPath("\AITCdotnet\atad\AlpaIntlTC_BP.mdb"))
sbPath.Append(";""")
'Response.Write(sbPath.ToString)
Dim cnStr As String = sbPath.ToString
Dim cnIssues As New OleDb.OleDbConnection(cnStr)
End Sub

If you uncomment the Response.Write and comment out the two following Dim's, the sbPath returns a perfectly formatted connection string.

However, whether I use the code as shown, or strike the first Dim and pass sbPath.ToString to the Connection object, I get an error about the "initialization string not being properly formatted at index 142." Near as I can tell, that is around the end of the string, but I can;t determine what it thinks is wrong. It has a trailing semi-colon, so any extra "spaces" shouldn't matter.

Once I can get this to work in the code, I will try and place the known end of the relative path in the web.config file. I think I can make that work, but first I have to get the conn string to work at all.

? Thoughts

PS. If it isn't already horribly obvious, I am still looking mostly upwards on the learning curve.
Link to a previous post along the same effort to make this connection string work. Previous work was with ASP/VBScript using DSN's...that was painless comnpared to this.
I changed Server.MapPath to Request.PhysicalApplicationPath and modified the rest of that line to satisfy the syntax. It returns the same otherwise perfect conn string in the Response Write, but fails the same way with index 142.
The connection string itself doesn't contain quotation marks!! Use:

 Private Sub cnSb()

Dim sbPath As New StringBuilder(200)
sbPath.Append("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=")
sbPath.Append(Server.MapPath("\AITCdotnet\atad\AlpaIntlTC_BP.mdb"))
sbPath.Append(";")
Dim cnStr As String = sbPath.ToString
Dim cnIssues As New OleDb.OleDbConnection(cnStr)
End Sub


The reason that I said to user Request.PhysicalApplicationPath is so that if you use this code in files that are in subdirectories, etc then you don't have to change the path that you pass into Server.MapPath().
> then you don't have to change the path that you pass into Server.MapPath().

Should read:

then you don't have to change the path that you would have to pass into Server.MapPath().
Some success! I have it working now on my laptop. I had to edit the initialization string in the "web designer Region" in order for the index 142 problem to go away. I think the Properties box, the web designer region and the "real" code must have it out before any application will work. With your help I stumbled into a workable balance.

Regretably it is still gving an error on the web server. I'll have to investigate that a bit more, since it may be a problem of the /bin folder.

Thanks to my New Brunswick and Yorkshire friends for your kind help this morning.
The error I am now getting on the web server :

Server Error in '/' Application.
------------------------

File or assembly name System.Data, or one of its dependencies, was not found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: File or assembly name System.Data, or one of its dependencies, was not found.

This leads me to believe that the Request.PhysicalApplicationPath object may be from a namespace other than those I "Imported." Can you tell me where it derives from?
I have now imported System.Web, having answered my own question by pursuing a link to the MSDN library online provided by Steven. It did nothing to fix the above error message, and did not harm the successful running of the application on the "laptop/localhost."

Any thoughts?

The Fileupload Control with the Pocket IE

Hi, I'm developing an application (ASP.NET 2.0) that needs to upload afile from a Pocket PC with Pocket InternetExplorer. I've put aFileUpload Control and it works well with a Internet Explorer in a PC,but doesn't appear if I access from my pocket PC with PocketInternetExplorer.
What's happening?
How can I upload a file from Pocket IE?
THANKS!

Does anyone solved the problem??
I still don't know how to upload files with my Pocket PC windows 2003 mobile.
HEEELP!!