|
Yep, that's what I understood you to want.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Oh my good time. u understood chris. Could you say some solutions or ways to get it. Please chris. I hope u ll come with some solution.
thank you
Gopinath.R
|
|
|
|
|
Hi chris. Come on friend i need ur help... could you find the solution?
Gopinath.R
|
|
|
|
|
Can someone please help me?
I am developing a form in vb where I have a grid built on the fly based o a table. This grid is 2 columns, change and a description. I am using the first column "Change" as a linkbutton telling me what row I am editing. I use this logic in other places without problems, but I don't know why this will not work on this page. Here is my code:
Dim TableString, mVar As String
mVar = """"
TableString = ""
TableString = "<table border=" + "1" + " bordercolor = " + "000000" + " cellspacing = " + "0" + " cellpadding = " + "0" + " >"
Try
mSqlConn.Open()
sqlRdr = mSqlCmd.ExecuteReader
While sqlRdr.Read
Try
TableString = TableString + "<tr>"
Dim Typenum As LinkButton = New LinkButton()
TableString = TableString + "<td id = " + mVar + "Typenum" + sqlRdr("Typenum").ToString.Trim + mVar + " runat=" + mVar + "server" + mVar + "> <a href=" + mVar + "javascript:__doPostBack('Typenum" + sqlRdr("Typenum").ToString.Trim + "','')" + mVar + ">Change</a></td>"
TableString = TableString + "<td bgcolor = " + sqlRdr.Item("int_bguser").ToString.Trim + " forecolor = " + sqlRdr.Item("int_fguser").ToString.Trim + ">" + sqlRdr.Item("lngdesc").ToString.Trim + "</td>"
TableString = TableString + "</tr>"
Finally
End Try
End While
Finally
mSqlConn.Close()
End Try
TableString = TableString + "</table>"
lblType.Text = TableString
I am also sending the rendered code:
<table border=1 bordercolor = 000000 cellspacing = 0 cellpadding = 0 ><tr><td > <a id="typenum00" href="javascript:__doPostBack
('typenum00','')">Change Colors</a></td><td bgcolor = SpringGreen forecolor = Black>Full</td></tr></table>
I have no other references to java and I am a very basic programmer, so please keep the answer simple
Any time we click on Change I get a error - object expected.
Any ideas?
Lois
|
|
|
|
|
Using the GridView-object makes working with data in a grid more easily.
There are tons of examples for you to make it like that.
ASPX:
<asp:gridview id="myGridView" runat="server" datakeynames="ID">
<colums> <asp:HyperLinkField DataTextField="TypeNum" HeaderText="TypeNum" />
<asp:boundfield datafield="int_bguser" headertest="BG user">
in Your ASPX.VB you create a Method which is called IN the page_load eventhandler.
In that created method you retreive your data from the database and DataBind it to the myGridView component.
Good Luck!
|
|
|
|
|
hello. i m creating a weblist. i wanna save to database website meta keywords which are added my website. for example a user entered to my website and added him/her web site addres to my database. (www.sitename.com) when i allowed this web site publish in my website, i wanna automatically add meta keywords (title, description...) of this web site to my database. how i can this? how i can access to websites meta tag?
regards.
viva la commune
|
|
|
|
|
Hi, i'm in the process of learning ASP, so this is probably a really stupid question.
I'm trying to create a simular effect to the green menu bar the code project has above. On the left i would like the menu, and on the right, the login status.
I have tried a few things with div tags and styles but not got it working correctly. I notice above it is done with tables. Is that the only / best way to do it.
This is the snipet of code im working at the moment. The left and right styles just have float set to left and right (surprisingly).
<div id="mainMenu" >
<asp:SiteMapDataSource ID="siteMapDataSource" runat="server" ShowStartingNode="False" />
<asp:Menu ID="menu" runat="server" DataSourceID="siteMapDataSource" Orientation="Horizontal"
DisappearAfter="200" StaticEnableDefaultPopOutImage="False"
CssClass ="left">
</asp:Menu>
<div class="right">
<asp:LoginView ID="loginView" runat="server">
<LoggedInTemplate>
<asp:LoginName ID="loginName" runat="server" />
</LoggedInTemplate>
<AnonymousTemplate>
You are not logged in
</AnonymousTemplate>
</asp:LoginView>
|
<asp:LoginStatus ID="loginStatus" runat="server" />
</div>
</div>
<div id="content">
<asp:ContentPlaceHolder ID="mainContent" runat="server">
</asp:ContentPlaceHolder>
</div>
Thanks in advance for any help.
|
|
|
|
|
Hello friends,
I want to transfer some data from one form to another form.
But i don't want to use session or querystring.
Is there any other way to transfer tha data.
Deepak Nigam
|
|
|
|
|
Help yourself to these[^] links.
|
|
|
|
|
you can use Hidden field.
mitesh
|
|
|
|
|
Why is it that I keep answering this same question lately ?
Create your two pages as controls, and show them both on the one page. Then viewstate will hold the data for you, your main page just has to move the data between the pages as it shows/hides them.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How do I find my servername and port number on my own computer?
I want to do this on my local before i use a hosting.
|
|
|
|
|
They don't relate to your computer, they relate to your ISP. Check Out look, they will be in there, or you wouldn't be able to check your mail.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I have a DLL with some win controls in it that i am embedding in a ASP.NET page. However, when ever i want to select from the database i get OleDbPermission exceptions even after i've done: Demand(); or Assert();
Is there a simple way of just telling IE to just trust the DLL and ignore all the security issues since this is a personal project and will only ever be run on my computer.
Regards,
Gareth.
|
|
|
|
|
I am having a grid and it contains two columns. The First Column contains one Image and the second column contains table and in the first row of the table i have a Link button like this :
<asp:linkbutton text="">]]>' runat="server" ID="BookTitle">
And i want to invoke an event during onclick event of this link button.
Also if i use onSelected_IndexChanged event in grid view like :
public void GridView1_OnSelectedIndexChanged(object sender,EventArgs e)
{
e.-----------
}
This event is not occuring.
I am working on 2.0 gridview.What should i do to invoke the event .Where i am wrong.
Can anybody helpme
VanithaVasu
|
|
|
|
|
The LinkButton should have a CommandArgument as "Select". This would trigger the SelectedIndexChanged event. Have you noticed it?
|
|
|
|
|
I'm using the following to insert a record in my DB;
protected void submitButton_Click(object sender, EventArgs e)
{
DataSet2TableAdapters.guestsTableAdapter adapter = new DataSet2TableAdapters.guestsTableAdapter();
adapter.Insert(nameTextBox.Text, messageTextBox.Text);
adapter.Dispose();
}
And it succeeds in the insert but the page doesn't show the new data but, if I go to another
page and come back it shows up.
So my question is how do I update the page where I'm doing the INSERT after I do the insert.
Much obliged,
Mike
|
|
|
|
|
The order is page load, then events, then page prerender. I'd say you're loading your data in page load, before the event fires to add the new record.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian,
Thanks that makes sense. Would it make any sense to reload (?fill?) in the prerender stage?
Thanks
Mike
|
|
|
|
|
I think Rebinding the datasource after the insert will solve the issue.
|
|
|
|
|
Thanks for the advice I got it to work by overriding the Page's OnPreRender method!
Works like a charm!
Mike
|
|
|
|
|
I have an ASP.net web page,
From the web page how can i write
the content of a text box to serial port.
Please help me.
|
|
|
|
|
Member 4663137 wrote: From the web page how can i write
the content of a text box to serial port.
It's not possible. ASP.NET is not built for that.
|
|
|
|
|
I have an application that I would like to show different login pages based on the client or url. I have the roles and members setup and I have a default value for the loginurl parameter in the web.config. I would like to intercept this before the page redirects to login.aspx and be able to define the loginurl or use the FormsAuthentication.RedirectToLoginPage() method. Where is the best way to do this?
Also I am using a basepage for all of my pages.
|
|
|
|
|
HELP... one of my DBA wrote me this oracle sp, when my web form call this sp, I will pass over 2 params which which are firstname and lastname, then this sp will insert the 2 params to the table, if the insert succ, the sp will return 0 else return and 99 for error, how can i retrieve the error_code from my code behind. i dont need to retrieve the error_mes
PROCEDURE Insert_Data(
i_lastname IN VARCHAR2,
i_firstname IN VARCHAR2,
error_code OUT NUMBER,
error_mes OUT VARCHAR2
)
IS
BEGIN
INSERT
INTO new_table(
rec_id,
i_firstname,
i_lastname,
created_date,
new_old,
created_by
)
VALUES (
rec_id.nextval,
firstname,
lastname,
SYSDATE,
'New'
);
error_code := SQLCODE;
error_mes := SUBSTR (SQLERRM, 1, 250);
COMMIT;
EXCEPTION
WHEN OTHERS THEN
error_code := SQLCODE;
error_mes := SUBSTR (SQLERRM, 1, 250);
END;
from code behind , how can i retrive the error code
---------------------------------
public int Insert_Data(string first_name, string last_name)
{
string OracleConnString = ConfigurationManager.ConnectionStrings["connstr"].ToString();
using (OracleConnection conn = new OracleConnection(OracleConnString))
{
OracleCommand cmd = new OracleCommand("Class.Insert_Data", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("i_firstname", OracleDbType.Varchar2, first_name, ParameterDirection.Input);
cmd.Parameters.Add("i_lastname", OracleDbType.Varchar2, last_name, ParameterDirection.Input);
cmd.Parameters.Add("error_code", OracleDbType.Int32).Direction = ParameterDirection.Output;
conn.Open();
cmd.ExecuteNonQuery();
//What should i do here
return return_code;
}
}
|
|
|
|