|
Yes I want to access to Properties declared public in class busniss object in the class bll
|
|
|
|
|
To then its simple
create an object of a business object class
BOClass obj new BPClass();
obj.PropertySet= "3" --Property set ,set the value of a property
String GetValue = obj.PropertyGet();--Get the value of a property
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hello
What is the maximum size for webconfig not to have any problem? Forexample if the webconfig file is bigger than 5 MB or bigger than 50000 lines, that can couse a problem.
Would it make my site work slower ?
viva la commune
|
|
|
|
|
The web config file is loaded when the application goes online. It is loaded only once and is shared between all users. So as long as you have a decent hardware configuration for your server, you shouldn't have any problems, it should work.
On the flip side having a large number of config entries can increase the seek time when accessing config items.
HTH!
|
|
|
|
|
Hi friends,
I hav got a problem while redirecting my web interface to other remote web interface.
Here the scenario is, i hav integrated my web interface with other remote web interface,
A link on remote web interface will route to my web interface with user credentials, after validation
browses through my web.
I am using response.redirect to redirect to pages. this is working fine in Firefox and chrome but does not work in IE, m getting session expire problem in IE.
pls suggest , thanks in advance.
Regards
Surender
No Defeat Is Final Until You Stop Trying!.......
|
|
|
|
|
I sorted it out myself after googling for sometime.
By adding HTTPHEADER P3P:CP="CAO PSA OUR" In IIS resolved my problem.
Hope this would help others.
Regards
Surender
No Defeat Is Final Until You Stop Trying!.......
|
|
|
|
|
iam taking data from one page gridview to another page in session but it is not displaying in another page gridview
please check my code and give suggestion which helps me
string constr = "Data Source=MAINSERVER;Initial Catalog=Inventory;User ID=sa;Password=nsg_ss_0103";<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
<br />
<br />
if (Page.IsPostBack == false)<br />
{<br />
GridView1.PageIndex = 0;<br />
<br />
bindata();<br />
<br />
}<br />
<br />
<br />
<br />
<br />
<br />
<br />
}<br />
private void bindata()<br />
{<br />
<br />
SqlConnection con12 = new SqlConnection(constr);<br />
SqlDataAdapter da12 = new SqlDataAdapter("SELECT [CategoryNameE], [ItemKey], [ItemKeyNameE], [CurrentQTY], [SalesPrice] FROM [CurrentInWH]", con12);<br />
DataSet ds = new DataSet();<br />
da12.Fill(ds, "t");<br />
GridView1.DataSource = ds.Tables["t"];<br />
GridView1.DataBind();<br />
}<br />
<br />
private void GetGridViewData()<br />
{<br />
DataTable dt;<br />
if(Session["CheckedRecords"]!=null)<br />
dt = (DataTable)Session["CheckedRecords"];<br />
else<br />
dt = CreateNewTable();<br />
<br />
for (int i = 0; i < GridView1.Rows.Count; i++)<br />
{<br />
CheckBox chk = (CheckBox)GridView1.Rows[i].Cells[0].FindControl("chk");<br />
if (chk.Checked)<br />
{<br />
dt = AddNewRow(GridView1.Rows[i], dt);<br />
}<br />
else<br />
{<br />
dt = RemoveRow(GridView1.Rows[i], dt);<br />
}<br />
<br />
}<br />
Session["CheckedRecords"] = dt;<br />
<br />
}<br />
<br />
private DataTable CreateNewTable()<br />
{<br />
DataTable dt = new DataTable();<br />
dt.Columns.Add("CategoryNameE");<br />
dt.Columns.Add("ItemKey");<br />
dt.Columns.Add("ItemKeyNameE");<br />
dt.Columns.Add("CurrentQTY");<br />
dt.Columns.Add("SalesPrice");<br />
dt.Columns.Add("Quantity");<br />
dt.Columns.Add("Total");<br />
<br />
dt.AcceptChanges();<br />
return dt;<br />
}<br />
<br />
private DataTable AddNewRow(GridViewRow gvrow, DataTable dt)<br />
{<br />
DataRow[] dr = dt.Select("ItemKey = '" + gvrow.Cells[2].Text + "'");<br />
if (dr.Length <= 0)<br />
{<br />
dt.Rows.Add();<br />
dt.Rows[dt.Rows.Count - 1]["CategoryNameE"] = gvrow.Cells[1].Text;<br />
dt.Rows[dt.Rows.Count - 1]["ItemKey"] = gvrow.Cells[2].Text;<br />
dt.Rows[dt.Rows.Count - 1]["ItemKeyNameE"] = gvrow.Cells[3].Text;<br />
dt.Rows[dt.Rows.Count - 1]["CurrentQTY"] = gvrow.Cells[4].Text;<br />
dt.Rows[dt.Rows.Count - 1]["SalesPrice"] = gvrow.Cells[5].Text;<br />
dt.Rows[dt.Rows.Count - 1]["Quantity"] = gvrow.Cells[6].Text;<br />
dt.Rows[dt.Rows.Count - 1]["Total"] = gvrow.Cells[7].Text;<br />
<br />
<br />
<br />
dt.AcceptChanges();<br />
}<br />
return dt;<br />
}<br />
<br />
private DataTable RemoveRow(GridViewRow gvrow, DataTable dt)<br />
{<br />
DataRow[] dr = dt.Select("ItemKey= '" + gvrow.Cells[2].Text + "'");<br />
if (dr.Length > 0)<br />
{<br />
dt.Rows.Remove(dr[0]);<br />
dt.AcceptChanges();<br />
}<br />
return dt;<br />
}<br />
<br />
protected void chk_CheckedChanged(object sender, EventArgs e)<br />
{<br />
GetGridViewData();<br />
<br />
<br />
<br />
TextBox txtqty1; TextBox txttott; CheckBox ch = null;<br />
for (int i = 0; i < GridView1.Rows.Count; i++)<br />
{<br />
<br />
txtqty1 = (TextBox)GridView1.Rows[i].FindControl("txtqty");<br />
txttott = (TextBox)GridView1.Rows[i].FindControl("txttot");<br />
ch = (CheckBox)GridView1.Rows[i].FindControl("chk");<br />
<br />
if (ch.Checked)<br />
{<br />
txtqty1.Visible = true;<br />
txttott.Visible = true;<br />
}<br />
else<br />
{<br />
<br />
txtqty1.Visible = false;<br />
txttott.Visible = false;<br />
<br />
}<br />
<br />
<br />
<br />
<br />
}<br />
<br />
}<br />
DataTable dt = (DataTable)Session["CheckedRecords"];<br />
GridView1.DataSource = dt;<br />
GridView1.DataBind();<br />
<br />
|
|
|
|
|
First and foremost, edit your post and remove the connection details. Its not so good to post your SQL server's sa password on forums even if it is CodeProject.
First step to solving this would be to step through your code and identify if the dt that your are persisting in the session has any values. Debug the application, put a break point on the statement Session["CheckedRecords"] = dt; . Check if it has any values before going into the session.
If it has values then on the 2nd page check what you are getting out of the session. Again put a break point on the line DataTable dt = (DataTable)Session["CheckedRecords"]; and check the values in dt.
Some suggestions [read free advice ]
1. Data table is an reference type. You need not return it from AddNewRow and RemoveRow methods. The dt in the calling function and the dt local to AddNewRow and RemoveRow methods point to the same datatable in the heap. Doing this way would just increase the over head on the GC and reduce maintainability of your code.
2. In the AddNewRow method, rather than doing "dt.Rows.Count - 1 " every time, do it once and store it as rowNum and use it subsequently. This reduces the number of execution cycles.
3. Format your code. Proper indentation improves readability.
HTH!
|
|
|
|
|
check the reply for your post on:
http://opexsolution.com/forum/viewtopic.php?f=15&t=27
|
|
|
|
|
Hi Guys
Is it possible to format specific words using CSS?
I'm wanting to highlight key words within some pages of code samples, but don't fancy wrapping all the keywords in tags...
Cheers,
oooo, the Jedi's will feel this one....
|
|
|
|
|
The current level of CSS does not offer this much
desired feature.It can be acomplished with a simple
regular expression either in javascript on the client
or the language of your choice on the server.The
result would be to progromaticaly add fancy wrapping
in tags to all the keywords .
|
|
|
|
|
OK cool. I'll have a crack at that method then. A little c# behind the scenes could go a long way...
Thank you.
oooo, the Jedi's will feel this one....
|
|
|
|
|
hello,
I want to make invitation facility in my website.j
so please...
can anyone tell me how to import contacts from gmail, yahoo, etc in asp.net.
it's very urgent.
Thanks in advance.
|
|
|
|
|
|
Each of them have their own services to import contacts,please see on google.com
|
|
|
|
|
You replied to me. . You should reply to proper message !!
Cheers !
Abhijit Jana | MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
ohh sorry Abhijit....
|
|
|
|
|
Hii
I have some problem .can anybody help me out.
Question:How to search aspx page names in entire asp.net website
Regards
Surya
|
|
|
|
|
Didn't get your problem. What do you mean by search aspx page name ? Do you want to search with in your web site ?
Cheers !
Abhijit Jana | MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Press Control,Shift and F button u will get a search window. Type usr page name u ll get all related pages
|
|
|
|
|
I have used urlrewriting.net for url rewriting in my application.I have buttonfield in gridview as
<asp:ButtonField HeaderText="Buy" ButtonType="Image" ImageUrl="~/images/addtocart.png"
CommandName="addtocart" />
Th image of add to cart is not coming.On running the application and looking to property of image it shows the url of page as
http://localhost:3811/Sections/flat-panel-displays-222
Instead of image url where it is stored i.e. http://localhost:3811/images/addtocart.png
|
|
|
|
|
Hi All,
I've got text going into a DB which may contain links, or naked URL's.
I do cleanup on the way in to avoid XSS attacks, but on the way out, I want any URL's to display as links.
So, I've got a couple possibilities. If the link is already within an anchor tag, then I want it to display properly as a link.
If the link is a plain URL within the text, I need to add an anchor tag.
I'm currently using:
Regex.Replace(dr.Item(1), "(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])", Function(match As Match) String.Format("<a href=""{0}"">{0}</a>", match.ToString()), RegexOptions.IgnoreCase)
This will add an anchor tag surrounding a naked URL, but what I need is for it not to act on a URL that is already within an anchor tags.
Help please?
|
|
|
|
|
Save yourself the trouble and clean the anchor tags from the string prior to saving to the database. As a rule of thumb you should never store formatted items in the database, let the formatting happen at the presentation layer. That way when the business rules change, or the data needs to be used in different context, it's easier to adapt.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Ok, I've narrowed down the question.
I have a Regex that matches a naked URL ( http://www.whatever.com/whatever.... )
What I need to know is what to add to the beginning and end of that Regex so that it does not match if there is a double quote right before or after the URL.
It's the "NOT QUOTES" thing that I'm not getting.
|
|
|
|
|
hi friends,
Can you give me a reference how to validate email address with asp.net? I want to check
that email address exists or not.Some one suggested to use windows dos command nslookup to find email server, but if I use a shared hosting that might not be a good idea.
So can you guys give me an idea or reference how to make things work??
Thanks
|
|
|
|