|
somebody told me to post in asp.net.. sorry i forgot to delete from c#.. i deleted it now from that c#
|
|
|
|
|
READ THE DAMN GUIDELINES
Do not remove or empty a message if others have replied.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi Guys and Gals,
I'm having an issue with creating and using an email form in ASP.Net. I cannot use SMTP and thus far have been unable to come up with something else useful. Any suggestions or resources I should check out? Thanks for all you help.
Jerry
“If you think you are worth what you know, you are very wrong. Your knowledge today does not have much value beyond a couple of years. Your value is what you can learn and how easily you can adapt to the changes this profession brings so often.”-– Jose M. Aguilar
|
|
|
|
|
What do you mean you can't use SMTP for email? Simple Mail Transfer Protocol is the backbone of email
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Feel my pain.
“If you think you are worth what you know, you are very wrong. Your knowledge today does not have much value beyond a couple of years. Your value is what you can learn and how easily you can adapt to the changes this profession brings so often.”-– Jose M. Aguilar
|
|
|
|
|
|
Hi guys,
The ampersand driving me crazy. How the heck am i suppose to access the datafile.
plz help
https://www.mysupport.com/myhosted/MainFolder/testFolders1&Folder/datafile.txt
|
|
|
|
|
Url.Encode
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
netJP12L wrote: testFolders1&Folder/
Parameters after '&' is considered as a Query String. Thus, in order to use it in a vald complete URL you need to encode your URL. As Mark suggested, URL.Encode would do this for you.
Encoding will convert this ampersand into it's html equivalent and thus will not make part of the text after it as query string.
|
|
|
|
|
I wanted to inform you that amperson Url encoding doesn't work for IIS 7. It worksin IIS 5 and 6.
|
|
|
|
|
|
I am new in .net world, i want to learn asp.net from starch to pro. Kindly recommend me some website URLs and books name about asp.net
Thanks
|
|
|
|
|
www.asp.net
and the best above all up and down is www.google.com
|
|
|
|
|
Try this: http://tinyurl.com/3yu4cek[^]
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
I'm having some problems getting my stored procedure to see th parameters I'm passing in. The parameters are retrieved from a web form, and seen to be successfully send to the data access tier, but when I run the code I get the following exception:
"Procedure or Function 'stbFormPropertiesToXML' expects parameter '@displayMode', which was not supplied. "
The code is:
DisplayMode = dMode;
FolderAlias = _folderAlias;
SqlConnection conn = new SqlConnection(@"Data Source= .;Initial Catalog=MXContact.NET_Demo_100401;Integrated Security=true;");
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "stbFormPropertiesToXML";
SqlDataAdapter frmDA = new SqlDataAdapter(cmd.CommandText, cmd.Connection);
DataSet FormPropertiesDS = new DataSet();
try
{
conn.Open();
cmd.Parameters.Add(new SqlParameter("@displayMode", SqlDbType.NVarChar));
cmd.Parameters["@displayMode"].Direction = ParameterDirection.Input;
cmd.Parameters.Add(new SqlParameter("@folderAlias", SqlDbType.NVarChar));
cmd.Parameters["@folderAlias"].Direction = ParameterDirection.Input;
cmd.Parameters["@displayMode"].Value = DisplayMode;
cmd.Parameters["@folderAlias"].Value = FolderAlias;
cmd.ExecuteNonQuery();
frmDA.Fill(FormPropertiesDS);
conn.Close();
FormPropertiesDS.WriteXml("FormProperties.xml");
}
catch (Exception ex)
{
errorMsg = ex.Message;
}
finally
{
conn.Close();
}
Where DisplayMode and FolderAlias are the parameters I'm trying to pass into the SP. The SP is defined as:
ALTER PROCEDURE [dbo].[stbFormPropertiesToXML]
@displayMode NVARCHAR(2),
@folderAlias NVARCHAR(30)
AS
SELECT *
FROM [stbFormProperties]
WHERE [FolderKey] = (SELECT [FolderKey] FROM [stbFolders] WHERE [FolderAlias] = @folderAlias)
AND [DisplayMode] = @displayMode
I've been eearching the web for articles for the past serveral hours; so a second pair of eyes would be a big help.
DRAYKKO
=======================
Every experience in life is a lesson to be learned
A. Stevens
B.S., Computer Science
|
|
|
|
|
You using the wrong method, cmd.ExecuteNonQuery(); is for commands like updates and inserts. You want to return data so need to use something like ExecuteReader. However, since you are using DataAdapater.Fill the call is not necessary at all.
Since SqlParameters are input by default it is not necessary to set it explicitly and the value can be set directly using
AddWithValue[^] so you eliminate a few lines.
Also, using SELECT * in a sql statement is a poor practice.
I know the language. I've read a book. - _Madmatt
modified on Tuesday, June 22, 2010 2:36 PM
|
|
|
|
|
Thanks for the prompt reply! I'll correct that...
DRAYKKO
=======================
Every experience in life is a lesson to be learned
A. Stevens
B.S., Computer Science
|
|
|
|
|
|
Hi All,
I have a tab control, within one tab of this tab control I want to have another tab control which contains 3 or 4 tabs in which I need to display some database bounded list boxes.
All the tabs in the two tab controls are static. They can be database bounded also.
Can anybody please help me in inserting a tab control in to another tab control. Any code snippet or any link will be very much helpfull.
Thanks in advance, I will be googling in this mean time. But pls. if possible pls. try to help me. I am using Telerik controls, any telerik and any Ajax controls are also Ok for me.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
indian143 wrote: I have a tab control, within one tab of this tab control I want to have another tab control
Tab inside a tab sounds a bad UI. It won't look nice and user interactive. It might confuse.
If needed, you should try using a tab in accordian or vice-versa. It would be clean and user's won't get confused.
|
|
|
|
|
I have some code that works correctly until I utilize a dynamic UpdatePanel to reduce flicker. I am trying to get a value from the parent page via javascript. This code works correctly without the UpdatePanel to get the current value of the hidden field. Once I add the UpdatePanel dynamically, it only ever returns the initial value of 0 from the hidden field. Any ideas?
Javascript in popup page (returns only iniital value of zero if I use UpdatePanel):
var x = window.parent.document.getElementById('ctl00$contentBody$hdnApplicationIndex').value
Parent page (the one that uses ModalPopupExtender to display popup):
<asp:HiddenField ID="hdnApplicationIndex" Value="0" runat="server" />
<asp:Button ID="btnHidden" runat="server" style="display: none" />
<ajaxToolkit:ModalPopupExtender ID="mpeUser" runat="server"
CancelControlID="btnCancel"
OkControlID="btnOK"
TargetControlID="btnHidden"
PopupControlID="pnlUser"
PopupDragHandleControlID="pnlPopupHeader"
BackgroundCssClass="ModalPopup">
</ajaxToolkit:ModalPopupExtender>
<div id="pnlUser" style="display: none;height:600px;width:800px">
<asp:Panel runat="Server" ID="pnlPopupHeader" CssClass="PopupHeader">
User Search
</asp:Panel>
<iframe id="frmUserSearch" src="ModelUserSearch.aspx" scrolling="yes" style="height:100%;width:100%" frameborder="1">
</iframe>
<div style="display: none">
<input id="btnOK" onclick="ok();" type="button" value="OK" />
<input id="btnCancel" type="button" value="Cancel" />
</div>
</div>
Code-behind of parent page (happens during OnInit):
Button btnModelUser = new Button();
btnModelUser.ID = "btnModelUser_" + intAppIndex;
btnModelUser.Text = "Model User...";
btnModelUser.Click += new EventHandler(btnModelUser_Click);
UpdatePanel updModelUser = new UpdatePanel();
updModelUser.ID = "updModelUser_" + intAppIndex;
updModelUser.ContentTemplateContainer.Controls.Add(btnModelUser);
Table tblQuestions = new Table();
tblQuestions.ID = "tblQuestions_" + intAppIndex;
TableRow trModelUser = new TableRow();
trModelUser.ID = "trModelUser_" + intAppIndex;
TableCell tcModelUserButton = new TableCell();
tcModelUserButton.ID = "tcModelUserButton_" + intAppIndex;
tcModelUserButton.Controls.Add(updModelUser);
Here is where I change the value of the hidden field. Updated value is not retreived when I use the UpdatePanel:
protected void btnModelUser_Click(object sender, EventArgs e)
{
Button button = sender as Button;
int intIndexUnderscore = button.ID.IndexOf("_");
hdnApplicationIndex.Value = button.ID.Substring(intIndexUnderscore + 1);
mpeUser.Show();
}
|
|
|
|
|
You need to understand how UpdatePanel works. The hidden field, which is a poor design anyway, needs to be placed in the scope of the UpdatePanel for its value to available.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks for your help. So what is a better way to get the ApplicationIndex value to be able to be accessed in the popup page? I will not know the value that needs to be set in ApplicationIndex until the user clicks one of the dynamically created buttons in the table on the page. The hidden field seemed like an easy solution, but I will have a problem if I have to set the ApplicationIndex value in a dynamically created control in the table. There would be one dynamic UpdatePanel per button and I would need to place the ApplicationIndex value in a control in the UpdatePanel. Therefore the popup panel code will not know which of the dynamically created controls to retrieve the value from.
Thanks.
Adam
|
|
|
|
|
Naptown Brown wrote: There would be one dynamic UpdatePanel per button
Why? Reuse the popup. Send the index to your page via a query string.
You should do some research on using JavaScript, JQuery has great support for modal dialogs. An UpdatePanel and button click postback aren't even necessary.
You should also learn to use the proper events. Button.Command allows you to set data such as the index number in the CommandEventArgs parameter rather than the cumbersome and slow string parsing you are trying to do.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
function PrintPage() {
printWindow = window.open("../xyz.pdf");
printWindow.print()
}
it's open the page but not print the page
|
|
|
|