|
hi , i am populating retailer id column ,in that some are 0 ,so in place of 0 , i am assigning text as "assign id" ,all id's will navigate to edit particuar id page and this "assign id" should go to add page.
|
|
|
|
|
Soory dear, but still i have confusion.
But i am assuming that in case of "0" retailer ID you want to assign some text.
So here is two case:
Case 1: If you dont want to naviagate user to any page. then please assign "#"
Case 2: If you want to navigate user to some particuler page then u need to assign url of the page.
Now please let me know where exactly u r facing problem?
Regards
Anil Pal
|
|
|
|
|
hi , i am navigating whole column to edit retailer page,by using this code in source page
<asp:hyperlinkfield datanavigateurlfields="qretid" datatextfield="RETAILERID" headertext="Retailer ID" xmlns:asp="#unknown">
and assign id is also in same column , assign id should navigate to add retailer page.
|
|
|
|
|
Hello friends . I have proplem receive mail from my asp.net project. I didnt make how can write codes then I can recive mail using pop3. and attachments I want receive mail and attachment then I will download tihs attachment. Pelase Help me my mail : mugla_vedat@hotmail.com please this is my project helpme.
|
|
|
|
|
This is a general C# task, it has nothing to do with .NET. Posting your email address is stupid, it will just get you spam. Have you bothered to try google ?
If you want to receive mail FROM your ASP.NET project, then you want to send mail. Read my article on how to use google for the answer to that question, and examples of how to use google to answer it.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
please send me your link I dint find please help me.
|
|
|
|
|
The article on how to use google is here on code project. If you can't work out how to search this site for my articles, perhaps the whole thing is just beyond you ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi Check the following code
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
MailAddress fromAddress = new MailAddress(txtEmail.Text);
smtpClient.Host = "mail.xyz.com";
smtpClient.Port = 25;
message.From = fromAddress;
message.To.Add("abc@xyz.com");
message.Subject = "put some subject";
message.IsBodyHtml = false;
message.Body = "your body text";
smtpClient.Send(message);
put this code under your send button event.
|
|
|
|
|
Hi Guys,
I am trying to populate records from pop-up to main window,
I have a GridView1 in pop-up window and I am passing ID from pop-up to main window by using this code..
GridViewRow row = GridView1.SelectedRow;
string str = row.Cells[1].Text;
Response.Write("<script type='text/javascript' language='javascript'>opener.document.getElementById('txtID').value = '" + str + "'; window.close();</script>");
I am successfully passing value to main window from pop-up window.
But I want to populate records by using this “ID” and fill all textboxes values of main window.
I have a Text ChangeEvent which is not working when I am passing value from pop-up to main window.
Is there anyother option to populate records of main window?
Can we call a function of mainwindow from pop-up window(I am using GridView1 and passing value on this event..)
GridView1_SelectedIndexChanged1(object sender, EventArgs e)
Pease Help with sample codes..
Thanks,
|
|
|
|
|
Hi,
Yes u can follow below step to full fill yr requirement.
1.Take the Hidden Field Control on your main Window.
2. Assign the ID to hidden field control from yr pop pup window like below:
window.opener.document.all["ctl00_cnPlaceHolder_hdnFieldId"].value=selectedIDValue;
The above code in Java script.
3. Call the "hdnFieldId" field Value Changed event.
protected void hdnFieldId_ValueChanged(object sender, EventArgs e)
While call the above event you can do wht ever u want.
There can be alternate solution, id dont like this one then let me know.
Feel free to ask any query
Regards
Anil Pal
|
|
|
|
|
Anil thanks ....Could you please provide me other solution?
|
|
|
|
|
I have few Web forms with same controls but different data. Which design pattern is suitable in this scenario?
WebForm 1 (city.aspx) with combobox and grid control
WebForm 2 (state.aspx) with same controls i.e, combobox and grid
WebForm 3 (country.aspx) with same controls i.e, combobox and grid
the structure of 3 Web forms is similar only the content is different at run time.
Instead of 3 .aspx & .cs files i want to refactor and apply design pattern which would suite this scenario. Which design pattern to apply to refactor the code?
|
|
|
|
|
They have design patterns for grouping controls in web forms now ? I'd imagine if you have pages with the same controls, you could make it one page and change the data sources based on a query string parameter. Or you can create a control that you can set data sources for, and consume that in three pages. But, it's just two simple controls, I don't think it's worth it.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
hi,
i have next and previous buttons, when i click next i must get the next xml node value and if i click previous button it should display the previous node value. can anybody help in this regard.
Thanks in advance.
|
|
|
|
|
|
hi, thanks for the help.
Actually i have a webpage which contains previous and next buttons.
in the same page i have a frame where i have to change the value of the iframe src depending on the previous and next buttons. the value will be taken from XML node values.
Please check the xml doc below.
<?xml version="1.0" encoding="utf-8" ?>
<portfolio>
<portfolios id="0808">
<src link="http://www.yahoo.com"></src>
</portfolios>
<portfolios id="0809">
<src link="http://www.gmail.com"></src>
</portfolios>
<portfolios id="0810">
<src link="http://www.codeproject.com></src>
</portfolios>
<portfolios id="0811">
<src link="http://www.xyz.com"></src>
</portfolios>
</portfolio>
and check my backend coding.
protected void imgbtnNext_Click(object sender, ImageClickEventArgs e)
{
//string crnturl = Request.Url.ToString();
XmlDocument doc=new XmlDocument();
XmlNode root = doc.LastChild;
if (root)
{
imgbtnNext.Enabled = false;
}
else
{
string myurl = Request.QueryString.Get("id").ToString();
XmlDataSource xsd = new XmlDataSource();
xsd.DataFile = "~/App_Data/portfolio.xml";
xsd.XPath = "portfolio/portfolios[@id='" + myurl + "']/src";
GridView ds = new GridView();
ds.DataSource = xsd;
ds.DataBind();
iframeprojects.Attributes.Add("src", ds.Rows[0].Cells[0].Text.ToString());
}
}
|
|
|
|
|
Hmmm, seems a bit complicated. Why not loading the document and the use Xpath?
XmlDocument doc = new XmlDocument();
doc.Load("...");
XmlNode oCurNode = doc.SelectSingleNodes("portfolio/portfolios[@id='" + myurl + "']/src");
iframeprojects.Attributes.Add("src", oCurNode.Attributes["link"].InnerText);
Best would be to pass the id of the current node, so that you can find the next one.
Regards
Sebastian
|
|
|
|
|
hi thanks Sebastian,
Nut i didn't get how to get the next node value.
|
|
|
|
|
Extend the code as following to get the next node id:
XmlDocument doc = new XmlDocument();
doc.Load("...");
XmlNode oCurNode = doc.SelectSingleNodes("portfolio/portfolios[@id='" + id + "']/src");
iframeprojects.Attributes.Add("src", oCurNode.Attributes["link"].InnerText);
XmlNode oNextNode = oCurNode.NextSibling;
string sNextId = oNextNode.Attributes["id"].InnerText;
Then save the sNextId somewhere so that on the next button click you can use it.
Regards
Sebastian
|
|
|
|
|
I have Web application. In most of the forms Frames are used. We are planning to use Master pages instead of frames. Could you please let me know what are the advantages of using Master pages over frames?
|
|
|
|
|
Frames are not supported by some of the browsers, or users are allowed to turn it off.
|
|
|
|
|
Well, for a start, they are totally different from each other. TOTALLY different.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I have Grid view control and this control is associated with SqlDataSource. Is it advicable to always associate a control with data source. What are the disadvantages doing so?
I'm currently changing the design and implementing MVC pattern.
Thanks in advance
|
|
|
|
|
nilam2477 wrote: Is it advicable to always associate a control with data source
You mean associating controls like SqlDataSource ? I don't recommend using SqlDataSource . It will force you to write SQL along with the markup. You will not get clean separation.
|
|
|
|
|
Hi, i created a first application using Ajax. I create a toolbar tab and get script manager control in the Master page. And then i used Ajaxcalendarextender in the design. But if i write code in the source it shows the following error.
<atk:calendarextender id="calImg" popupbuttonid="ImageButton1" targetcontrolid="TextBox1" runat="server" mode="hold" xmlns:atk="#unknown">
Unrecognized tag prefix or device filter 'ATK'.
Can anyone correct it?
|
|
|
|