|
How to access the value in a textbox given in a particular page to another page?
|
|
|
|
|
If you are posting it, then access via Request.Form["textboxname"] .
|
|
|
|
|
You can put the data in the session, put it on the URL, or use a cross page postback ( I never use those, they are a hack )
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,
I want to redirect from aspx page to html page for this html page i'll pass query string parameter like this
www.test.com/welcome.htm?login=sanju
how to get querystring parameter value in html page.
Thanks,
Dharani.
|
|
|
|
|
You'd have to do it in javascript, and hope that javascript is turned on, on the client machine.
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 )
|
|
|
|
|
dim StrCom as string = Request.QueryString.GetValues("CID")(0)
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
|
|
|
|
|
That's VB Script and therefore will only work in IE
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...
Can any one tell me...How i create connection string using key values in web.config file???? please give me a code..
The senerio is i want to build connection string on runtime(Dynamically change)...so i fill key value when i need to change....In Connection string tag Connection string value use this key value like variable and return me updated connection string...
Thanks
Haseeb.
|
|
|
|
|
Hello
in web.config file under appSettings tag write down
add key="webkey" value="server=SUJIT;uid=sa;pwd=sa;database=1World"
Thanks
Sujit
|
|
|
|
|
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!
|
|
|
|