|
Hi...
i am not asking how to add key in configuration file...My question is how i get the key value in
<connectionstrings>
<add name="Connection String" connectionstring="i" use="" here???="" providername="System.Data.SqlClient">
Tag????
|
|
|
|
|
Hello
Just follow this code.
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["webkey"]);
Sujit
|
|
|
|
|
Respected Gurus
i have a datagrid in asp.net like....
<asp:datagrid id="DataGrid1" style="Z-INDEX: 115; LEFT: 72px; POSITION: absolute; TOP: 184px"
="" runat="server" showfooter="True" width="711px" font-names="Verdana" font-size="XX-Small" bordercolor="#E0E0E0" backcolor="#FFFFC0" pagerstyle-mode="NumericPages" height="192px" font-bold="True" datakeyfield="RawMaterialCode" autogeneratecolumns="False" horizontalalign="Center" ondeletecommand="Grid_Delete" onupdatecommand="Grid_Update" onitemcommand="doInsert" oneditcommand="doEdit" oncancelcommand="doCancel" allowpaging="True" pagesize="5">
<columns>
<asp:boundcolumn datafield="RawMaterialCode">
<asp:templatecolumn headertext="Raw Materials">
<headerstyle font-size="12pt" font-names="verdana" font-bold="True" forecolor="White" backcolor="#003399">
<itemtemplate>
<%# container.dataitem("RawMaterial")%>
<footertemplate>
<asp:dropdownlist runat="server" id="footer_ddlRawMaterials" font-name="verdana" backcolor="#ffcc66"
="" font-size="8">
<asp:templatecolumn headertext="Micron">
<headerstyle font-size="12pt" font-names="verdana" font-bold="True" forecolor="White" backcolor="#003399">
<itemtemplate>
<%# container.dataitem("Micron") %>
<footertemplate>
<asp:textbox id="footer_txtMicron" runat="server" font-name="verdana" backcolor="#ffcc66" font-size="8"
="" width="50">
<edititemtemplate>
<asp:textbox id="data_txtMicron" runat="server" font-name="verdana" backcolor="#ffcc66" font-size="8" text="<%# Container.DataItem("Micron") %>" width="50">
<asp:templatecolumn headertext="Density">
<headerstyle font-size="12pt" font-names="verdana" font-bold="True" forecolor="White" backcolor="#003399">
<itemtemplate>
<%# container.dataitem("Density") %>
<footertemplate>
<asp:textbox id="footer_txtDensity" runat="server" font-name="verdana" backcolor="#ffcc66" font-size="8"
="" width="50">
<edititemtemplate>
<asp:textbox id="data_txtdensity" runat="server" font-name="verdana" backcolor="#ffcc66" font-size="8" text="<%# Container.DataItem("Density") %>" width="50">
<asp:templatecolumn headertext="Norm">
<headerstyle font-size="12pt" font-names="verdana" font-bold="True" forecolor="White" backcolor="#003399">
<itemtemplate>
<%# container.dataitem("Norm") %>
<footertemplate>
<asp:textbox id="footer_txtNorm" runat="server" font-name="verdana" backcolor="#ffcc66" font-size="8"
="" width="50">
<asp:button id="Button1" commandname="Insert" font-name="verdana" backcolor="#ffcc66" font-size="8"
="" runat="server" text="Add">
<edititemtemplate>
<asp:textbox id="data_txtNorm" runat="server" font-name="verdana" backcolor="#ffcc66" font-size="8" text="<%# Container.DataItem("Norm") %>" width="50">
<asp:templatecolumn headertext="GSM">
<headerstyle font-size="12pt" font-names="verdana" font-bold="True" forecolor="White" backcolor="#003399">
<itemtemplate>
<%# container.dataitem("Gsm") %>
<footertemplate>
SQM/KG
<asp:textbox id="footer_txtSQMPerKg" runat="server" width="50" font-name="verdana" backcolor="#ffcc66"
="" font-size="8">
<asp:editcommandcolumn buttontype="PushButton" updatetext="Update" headertext="Edit" canceltext="Cancel"
="" edittext="Edit">
<headerstyle font-size="12pt" font-names="verdana" font-bold="True" forecolor="White" backcolor="#003399">
<asp:buttoncolumn text="Delete" buttontype="PushButton" headertext="Delete" commandname="Delete">
<headerstyle font-size="12pt" font-names="verdana" font-bold="True" forecolor="White" backcolor="#003399">
<asp:boundcolumn datafield="sqmperkg">
<pagerstyle mode="NumericPages">
it shows me records from the database.
in my dataset i have done some programming to show the total in the grid,I have not used footer to show it,the record for total is already in the dataset.
eg.
headerRow
ajay 56 23 edit delete
vivek 23 12 edit delete
Total 89 35 edit delete
Footer_ _ InsertButton
this may be the format of my datagrid.
My problem is that i don't want to show the edit and delete button in the last row,which contains the total........
For that i m coding on the onitemdatabound event of grid as follows.....
dim str as string
str=e.Item.Cells(0).Text
If str= "Total" Then
e.Item.Cells(3).Controls(0).Visible = False
e.Item.Cells(4).Controls(0).Visible = False
end if
first time it gives me the value of header row,but after that it alaways gives me ''.
I think i should not code it on itemdatabound..but then....
Please suggest to do it on an urgent basis.
U can see that i m using the footer to insert the records...
|
|
|
|
|
Hey there!
I'm not very much into Regular expressions. What I want it to replace a url anywhere in a string, with a html link...
http:
should become
<a href="http://www.zonderpunt.nl" target="_blank">http:
Now, I found the following code :
<br />
string url = "http://www.zonderpunt.nl";<br />
url = new Regex(@"(http:\/\/([\w.]+\/?)\S*)", RegexOptions.Compiled | RegexOptions.IgnoreCase).Replace(url, "<a href=\"$0\" target=\"_blank\">$0</a>");<br />
which in fact does the trick (cool! fine for me :->) however, I want the regular expression (or a seperate regular expression) to also match url without the http:// prefix, and still convert them well (ofcourse then inserting http:// in front)
Help...
|
|
|
|
|
You can also find this when pasting a http:// link into the CodeProject textboxes.
|
|
|
|
|
Erhm... what do you mean??
|
|
|
|
|
I'm not sure why you need to use Regular expression.
What about this code?
string urlFormat = "<a href=\"{0}\" target=\"_blank\">{0}</a>";<br />
<br />
string url = "http://codeproject.com";<br />
<br />
url = string.Format(urlFormat,url);<br />
MessageBox.Show(url);<br />
--- Edit : HTML didn't show..
-- modified at 21:25 Tuesday 21st August, 2007
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Erhm, I want to use all possible url's not only zonderpunt.nl, this is just an example...
I want user to enter a text into a textbox. If that text 'somewhere' contains 'any' url, I want to convert that url into a link...
|
|
|
|
|
Hi
When I execute my web application I get the following error logged in the event log
アプリケーション プール 'DefaultAppPool' を提供しているプロセスが突然終了しました。プロセス id は '408' でした。プロセス終了コードは '0x80' でした。
Can anyone please help me in this regard.
thanks in Advance
|
|
|
|
|
ragavan wrote:
アプリケーション プール 'DefaultAppPool' を提供しているプロセスが突然終了しました。プロセス id は '408' でした。プロセス終了コードは '0x80' でした。
Ah. well. I don't know that language. What is it in English?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
|
Could anybody send me study material for 70-315 Exam
Thanks
Rohit
|
|
|
|
|
See, this is why I would never bother with MS certifications, or hire anyone who had one, and thought it meant anything.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Well said: what value is an exam that someone else can take for you?
|
|
|
|
|
Indeed, I've recieved spam from companies that take your name and your money, take the exam for you, and mail you out your new certification. As if an employer isn't going to notice that you have no clue, despite having the certificate.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: As if an employer isn't going to notice that you have no clue
You would truly be surprised!
|
|
|
|
|
probably....
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
He was only asking for a study guide, not the answers to the exam questions.
-- Always write code as if the maintenance programmer were an axe murderer who knows where you live.
Upcoming FREE developer events:
* Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o ...
* Reading: SQL Bits
My website
|
|
|
|
|
You can buy from testking if you want.
OR Should I buy and send it to you?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Rohituappu wrote: Could anybody send me study material for 70-315 Exam
I can't send you a study guide, but I can suggest that you go out and buy the relevant Exam Cram book by Que.
-- Always write code as if the maintenance programmer were an axe murderer who knows where you live.
Upcoming FREE developer events:
* Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o ...
* Reading: SQL Bits
My website
|
|
|
|
|
Hi,
I am developing a web application using c#.
My application login form takes 4 values like Server Name, Database Name, UserName, and Password. I want to create a connectionstring based on this values in log form at runtime.
Thanks in advance
Hari
|
|
|
|
|
A connection string is just a string. You can just build it in memory, the trick is, you need to store it somewhere ( the session, probably ), in order for it to then be available when you want to use it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Hi All,
How would i change incoming mms videos in 3G format to DVCpro 50 ?
Thanks for your time
|
|
|
|
|
I assume they get uploaded, then you write some DirectX code which converts them. Do you intend on sending them back again ? I expect you don't want to stream them in as one, and back as another ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|