Dubugging IEXPlorer

Dubugging IEXPlorer

To debug a deployed page, here are the steps to deploy it.

Note: Make sure you had unchecked the disable client script from Internet Explorer -> Internet Options -> Advance – Disabled Client Script.

1. use IIS Manager to open the page and IE address bar to track the location of the page
2. OPen the .asp Page in VS.Dot Net
3. Find the mehthod to debug.
4. Open your ASp page in new window of IE.
5. Go to Tools Menu – Click on Debug Process.
6. Select IExplorer from List of processes
7. Click Attach Button.
8. Select Client and Common languge runtime and Click Ok
9. click Close Button
10. Process CTRL + Alt + N to view the Running Documents Window ( or from Debug Menu – Expand Windows and Select Runnig Documents.
11. Your currently opend page will appear on the running window. Double Click on the page to open the script
12. Search your script and insert breakpoint (F9).
13. From Explorer Perform the required action to debug. e.g button Click.

it is very useful to debug code so enjoy.



Yasir Attiq Butt – Bloggs! – Returning Values from PopUP in ASP.net

🙂 Few days back i got a problem that i want to get values from pop up using javascript from ASP.net application. from the help of and guidance of my colleages i figure out a way of doing it . here are steps to do it.

– First Create a parent page
– Second Create a Popup Page

1. Add a hidden html text box control to page where you need the values (Parent). Set it to runat server (hidValue)

2. Add a HTML Button control to the page where you need values (Parent). set it to runat server (btndummy)

3. Add the javascript to open the popup window set it size and attributes (Parent).

function SKUWindow()

4. Add javascript caller function in to the button from you need to generate popup in my case there was a grid where i need to have button on every row here is the code ‘Check if it is an item or alterning item then run the code below (Parent)
Dim btnLookup As Button
Dim i As Integer
btnLookup = e.Item.FindControl(‘btnLookup’)
If Not IsNothing(btnLookup) Then
btnLookup.Attributes.Add(‘OnClick’,’javascript:return SKUWindow();’)
End If

if Button or any other thing else then
Button.Attributes.add(‘OnClick’, ‘javascript:return SKUWindow();’)

5. In the Popup window form add the javascript to get and return the values to the parent form. here is the sample.
function SetValues(SKU, Description, Price)
var Value = SKU + “/” + Description + “/” + Price;
return false;

Add this function to any place where you need to call the actions to of send values in my case there was hyperlink with Select. (Child)

Dim hypSel As HyperLink
Dim i As Integer
hypSel = e.Item.FindControl(“lnkSelect”)
If Not IsNothing(hypSel) Then
hypSel.NavigateUrl = “javascript:SetValues(‘” & e.Item.DataItem(“SKU”) & “‘,'” & e.Item.DataItem(“Price”) & “‘,'” & e.Item.DataItem(“Description”) & “‘)”
End If

if Button or any other thing else then
Button.Attributes.add(“OnClick”, “javascript:SetValues(“Value1″,”Value2″,”Value3″)”)

The above function receives all 3 values as parameters which i need to send to parent page. Concatinate the values into one string and set these values to parent forms hiddenTextbox control created in step 1 and call the onClick event of HTML button control created in step 2. Close the current window and return false to end call.

When you will click the Select button current window will be closed and the parent form will call the OnClick Event of HTML button control created in step 2 and values of the pop up will be written to the HTML text box. Add code the event in server side to get the values from HTMl Text box and do what ever you want with them in my case i create a row of item and add them to a a database and show on the grid. so here is the code

Dim drSKU As DataRow
Dim strValue As String

strValue = hidValue.Value

Dim arrChar(0) As Char
Dim arrValues() As String

dtSKU = CType(ViewState.Item(“SKU”), DataTable)

arrChar(0) = “/”
arrValues = strValue.Split(arrChar)

If arrValues.Length 0 Then
drSKU = dtSKU.NewRow
drSKU(0) = Request.QueryString(“CustomerNo”)
End If

i figure out that some time it could be a requirement from the client so it is very easy way to get values from the server. I would like to thank Ihsan and danish for the guidance.

Thanks and Regards

Yasir Attiq Butt

Code to Open new window in Java Script

i always tend to forget the code to open the new popup window in javascript but finally here is the code in view




height – size
width – size
status – yes/no
toolbar – yes/no
menubar – yes/no
location – yes/no

i think i dont need to remind it again.